side task labels
I need to make this kind of label at the side of my text outside of main area of the page, it needs to be aligned with that text.
at first i have done that with a grid (at left bar was that label and in the middle area of the grid i was using flex box for a responsive design)
but now I have a problem:
I need to make two of these texts next to each other with that label. Under each text there is a content that have to be under that text.
I tried to just split my grid to multiple areas but it was just causing more problems when I wanted to make it responsive . . .
I also tried to create it with a pseudo elements, but my lack of understanding of css would not let me finish it (although i could move it with position: relative, it would leave its hitboxes at its original position and it can't offset text from where it is really positioned.)
can some pro help me with this and tell me how to solve it?
thanks a lot
26 Replies
I think the problem that you have has been explained by Kevin in one of his videos. I suggest you check this video out.
https://youtu.be/r6hx35TbtN4?t=781
I have linked the part of the video where he demonstrates his implementation. You can watch the full video for more information.
Also he uses the css
counter
property to number the <heading>
sKevin Powell
YouTube
Build a responsive website with HTML & CSS | Part eight: Numbered list
Because of the way the layout for the numbered list is done, it's a little more complicated than it might appear at first!
🔗 Links
✅ GitHub repo for where I start this video: https://github.com/kevin-powell/fem-manage-landing-page-part-7
#css
--
Come hang out with other dev's in my Discord Community
💬 https://discord.gg/nTYCvrK
...
ow, nice . . . thanks a lot, this will help me for sure (I will try to implement it later and if everything works I will lable this as solved)
Sure
ok, finally found some time
. . .
by any chance, do you know how to solve this?
I made those labels through pseudo-elements (just so I don't need to create them in html every single time).
I made that layout according to that video you sent me
tho because I'm using pseudo-elements, I can't make multiple before and after elements (I'm using both for that one label) and I need to make another one in that space in the middle when I have two pillars like this
@senrastalker
(also, can I ping whole category of people or I shouldn't do that?)
OK, I think I did it, but I had to use one parameter, which I heard I shouldn't (don't know why it wasn't working, I don't know how that other element has bigger specificity)
it's still quite big and I believe terrible so any idea and advise would be great
Hey i think you can use the grid so that the item which is on two columns, can have its own ::after
so basically a 4 column layout
A layout something like this
so it will look like a two column layout for the single line item, and a 4 column layout for a double column item
I'm no longer using two pseudo classes for a one element (found out that I can use border-top-right-radius to get that desired shape) . . . that second css I sent is already fully working . . . the only problem is that mentioned
!important
Okay hold on... I will first replicate the problem you are having. I will see what I can do then
wait, I did smth . . . I just found out that .col-1.task has bigger specifity than just .col-1 (like obviously but everyone just said to me that only thing that matters is id>class>type)
So you are telling class has higher preference here
probably
Hold on, my first question is why are you splitting the tasks into one column and two column layouts?
bcs. it should look like this:
You can still use classes to make it like that. Wait ill show you
@m1.r0_bot check this out. Is this the result you were expecting?
yes
Okay
so what I have done is really simple
ill send you the demo code
https://codepen.io/Amrut-Wali/pen/PoxRgZe
I have made use of 2 grids
this is the grid for the numbered items
This is the grid for each item in the numbered tasks grid
Hope that helps
ow, so just a grid inside of an another grid
Yup
thx
Sure NP