r/CodingHelp • u/nejihyugasbf • Sep 02 '25
[HTML] post box off center?
i'm using this theme for one of my blogs and i noticed that the objects on the page are off center. i can't tell if it's actually off center or if i'm imagining it. if it is, can someone help me figure out how to shift it?
1
Upvotes
View all comments
Show parent comment
1
u/jcunews1 Advanced Coder Sep 03 '25
That's because you're using a fixed left margin (for
#infoand#post) based only when there's no vertical scrollbar showing. I the vertical scrollbar is showing, the width would be decreased because some of it is used for the vertical scrollbar.Replace the
margin-leftfor both#infoand#post, and replace it withmargin-inline:auto.margin-inlineis a shorthand formargin-leftandmargin-right. i.e. both left & right margins should be set toauto.