Syndicated from the fediverse. Read and engage on the original instance.
View original on lemmy.worldSyndicated from the fediverse. Read and engage on the original instance.
View original on lemmy.worldArt by gfcf14
https://www.facebook.com/webdevtoons
https://twitter.com/webdevtoons
25 replies
Weird flex, but ok
Hehe.
I see what you did there.
It's not weird, it's powerful!
Hell, I'm a web dev and I'd pay someone to center things for me
Same! I usually open the dev console and just flip through all the options until I find the one that does it
That'll be 200 dollars
Great, now make it blink.
For real. When I have a front-end story to do, I basically just slam on the keyboard until it looks close to how UX wants it.
Co-pilot?
I don’t do web dev, I write math software that makes very rich people richer. But I often hear of this centering and layout crap
Why doesn’t html just have hcenter and vcenter tags or something? Why is centering so hard?
HTML has moved on from non-semantic tags a long time ago, and centering is easy with modern CSS.
Since when does HTML not have a simple centering tag?
Edit: Since HTML5 apparently. Wow wtf?! I haven't actually used HTML since I was in high school. That's wild.
As a frontend dev: who knows?
Centering things on a web page is so easy.
I also have to look it up every single time.
I wasn't expecting this to work, and yet it does: https://css-tricks.com/the-peculiar-magic-of-flexbox-and-auto-margins/
"We have justify-content and align-items at home"
Back in the day we didn't have
flexand had to use dark arts to center divs. Young frontend devs these days have it easy. Heck, back in the day there is no frontend devs, just cgi-bin programmers. Get off my lawn!HTML is a markup language, its purpose is to structure documents, while CSS can be seen as an additional layer that allows you to style and alter the layout of HTML documents. Because of this philosophy, it wouldn't make any sense to have such tags.
well with the css grid and flexbox it's no longer a problem.
It actually has for centering things horizontally. Yes, it's literally
<center> content </center>. It's been around since the early 90s, too. Dunno about a vertical centercenteris mostly for centering text and is being deprecated in favor oftext-alignandmargin-*: autohttps://developer.mozilla.org/en-US/docs/Web/HTML/Element/centerCenter tag is deprecated in HTML5
I wish i was that good with html/css
Flex.
cool flex bro