Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
pyrotazz3088yThat "align to bottom of div" was the major stumbling block of my last site build... Even with SO it took me AGES!
-
@kargaroth Been messing around with flexbox for a few minutes now and things are actually coming together.
Thank you sir, you may have just made my life significantly easier. -
620hun83708yPosition: fixed;
Bottom: 0px;
For flex to work you need a full page container, which isn't always an option. For this it isn't necessary. -
@620hun
That fixes it at the bottom relevant to the page. I want it at the bottom of its parent element.
Thanks for the help though. -
Lol your rant is actually a RANT!
After that watching your first comment about flexbox is funny!
I was about to suggest it as well.
I use it in all projects. Fuck old browsers. -
Surprisingly, with the help of this thread, probably 70% of my CSS pain has gone and I didn't even come here to ask for help, just rant.
I finished the thing I'm working on to the point where I'm calling it 'good enough' and moving on. Thanks guys. You're all what Stack Overflow wishes it was. -
Look at that. Dev was able to vent and others helped. All without name calling or belittling.
-
Not always an option, but whenever I have difficulties doing what I want with CSS, I take a step back and see if my HTML needs to be structured slightly differently in order to accomplish my goal.
Sometimes some simple HTML changes make the CSS a lot simpler. -
Flexbox and align-items or justify-content (depending on wether you are using rows or columns as flex- direction) should do the trick.
-
@Swifticus agreed. When I start looking at hacky stuff like negative margins and even absolute positioning I know it's time to reconsider a reorder or restructure of the source html if possible. That usually solves the problem with half the effort and seems to be more 'solid.'
Why does CSS never work the way you'd expect? All I want to do is align something to the bottom of a div. No. Will not happen. You'd think it might be something simple as 'v-align' or 'align: bottom' or 'fucking put it at the bottom: now;'
No, it's never that simple. I try every result I can find from googling. Nothing. Simply does not work.
How about trying to keep a div to a square when you resize the page? That should be simple? height = width right? Fuck you. Ha hahah, no you have to implement some horrendous arcane hack involving fake elements and other bullshit.
You finally fix one thing and everything else you had working is now broken.
...and then some fuckwit comes along and goes "Oh, CSS isn't hard..." and it takes everything you have not to beat them to death with your rubber duck.
What the hell is wrong with CSS? It's not even programming! It's just pure, sadistic hell! FUCK CSS!!!!
undefined