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

CSS

667 readers
2 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
[โ€“] emmanuelw@jlai.lu 2 points 6 days ago (1 children)

Why not body {margin: auto;}?

[โ€“] claim_arguably@lemdro.id 2 points 6 days ago

I'm a beginner doing the odin project. So i don't really know.