Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Yes, I agree with you.
aadilp11645yWe've all been there.
Sometimes . You just have to
I feel the same anytime I use !important
The only time I use negative margin is center aligning an absolute element.
Although I hear there is a better way of doing it.
A second case for negative margin or the use of !important is when editing someone else's code. God does it drive me mad.
Setting a element to center
The centerele must have width or height defined to center if you just want vertical don't use left or right if you want horizontal only don't use top bottom
There is obviously flex now as well..
You should never use, !important
But in a rush and your working on someone code... It understandable. But literally no other reason
NickdeK525yYes you should, I turn into the hulk when I see that. Just do left 50% and transform: translatex(-50%) Or better yet: flexbox ftw