this post was submitted on 20 Dec 2025
7 points (100.0% liked)

CSS

683 readers
3 users here now

founded 2 years ago
MODERATORS
 

I have a .container div just after body that contains everything in page how to center it?

you are viewing a single comment's thread
view the rest of the comments
[–] claim_arguably@lemdro.id 2 points 1 month ago* (last edited 1 month ago) (5 children)

How to make it centered vertically as well?

[–] emb@lemmy.world 2 points 1 month ago (3 children)
[–] claim_arguably@lemdro.id 2 points 1 month ago (2 children)

Is it a good idea to make body a flexbox? Is there any standards for doing this?

[–] brian@programming.dev 3 points 1 month ago

there are more aggressive css "resets" that set the default display type to flex. there's no problem making anything a flexbox if it displays the way you want it to

load more comments (1 replies)
load more comments (1 replies)
load more comments (2 replies)