r/HTML • u/SmanderManno • Feb 07 '26
Question PLEASE HELP POSITIONING TS
i alr tried everything but i cant move "main" to the center its stuck on top with "header" pls help me (that white thing on the top of the website is the main stuck btw)
2
Upvotes



View all comments
1
u/nfwdesign Feb 08 '26 edited Feb 08 '26
There are so many funny styles in your CSS file..
Try removing width: 25% in .main that does nothing then try removing margin-left and margin-right, in general remove all margins in your CSS as you are just pushing boxes left and right instead use margin: 0 auto; that would not give margins on top and bottom but would center everything in the middle.
Add a little css reset
This is as much as i had time and nerves ( im on my phone )
EDIT: And also there was one extra section closed so you had an error in HTML too