Like most things in the world of dev, there are right and wrong ways to do things. Just because you can doesn't mean you should! CSS can be quite nice when used correctly!
I actually encountered an issue earlier today where my important wasn't working...and it was because another dev had already added a more specific important.
Z-index is how you set the layering of your web page. If I have elements with Z-index of -1000, 0, and 99999 they will overlay each other in that order with 99999 being on top.
The joke is that he put his div on the highest layer and still doesn't see it.
26 Comments
odium@programming.dev · 74 pts · 3y
z-index: 999999 !important;
maeries@feddit.de · 40 pts · 3y
!didistutter?;
sbv@sh.itjust.works · 28 pts · 3y
!importanter;
Xylight@lemmy.xylight.dev · 35 pts · 3y
fun fact:
!important !importantis essentially!importanter, and you can go even further if you want a hell of a css hierarchywhatisallthis@lemm.ee · 13 pts · 3y
You can also just write your class again as some sort of additional specificity like
.myclass.myclass.myclass { color:red !important !important; }
FUsername@feddit.de · 6 pts · 3y
The fact that this and the prior comments work don't make like CSS more tbh
MellowSnow@lemmy.world · 2 pts · 3y
Like most things in the world of dev, there are right and wrong ways to do things. Just because you can doesn't mean you should! CSS can be quite nice when used correctly!
havocpants@lemm.ee · 2 pts · 3y
this and the parent comment have blown my mind.
elxeno@lemm.ee · 2 pts · 3y
lukas@lemmy.haigner.me · 2 pts · 2y
AlecSadler@lemmy.ml · 18 pts · 3y
I actually encountered an issue earlier today where my important wasn't working...and it was because another dev had already added a more specific important.
I deleted their important.
SnowdenHeroOfOurTime@unilem.org · 7 pts · 3y
I support this. Assert dominance.
GombeenSysadmin@feddit.uk · 2 pts · 3y
When I read that, I can never not say “not important” in my head
hellishharlot@programming.dev · 3 pts · 2y
Yeah I think that makes CSS a manager. It's always prioritizing not important things
odium@programming.dev · 2 pts · 3y
Same
cs127@lemmy.sdf.org · 46 pts · 3y
the z index is so high that the div escaped your monitor and is behind your head now
SpaceNoodle@lemmy.world · 21 pts · 3y
"programmer"
_hovi_@lemmy.world · 12 pts · 3y
Always forget the
position: relativeTheYear2525@lemmy.world · 6 pts · 3y
Stacking contexts
whatisallthis@lemm.ee · 1 pts · 3y
Along with transforms being 3d or flat transform styles
Eheran@lemmy.world · 5 pts · 3y
I don't get it :(
maniacal_gaff@lemmy.world · 5 pts · 3y
You are most likely a programmer then.
Simpsonator@lemmy.world · 4 pts · 3y
Z-index is how you set the layering of your web page. If I have elements with Z-index of -1000, 0, and 99999 they will overlay each other in that order with 99999 being on top.
The joke is that he put his div on the highest layer and still doesn't see it.
sillynessitself@lemmy.world · 5 pts · 3y
It is now behind him
Eheran@lemmy.world · 1 pts · 3y
Got it ;)
TootSweet@lemmy.world · 4 pts · 3y
Never mind,
z-index: 1000000;worked.Kaped@lemmy.ml · -5 pts · 3y
QuazarOmega@lemmy.world · 1 pts · 3y
Only coding
QuazarOmega@lemmy.world · 0 pts · 3y