Web content is not in the center of the page

My code says it’s centralized but the web shows my content to the left.

Any idea why?


Without seeing the complete code, it is difficult to be sure how to suggest guidance.

Maybe try setting the left and right margins to auto. That may help.

Happy coding! :slight_smile:


body {
background-color: burlywood;

h1, h2, p {
text-align: center;

#menu {
width: 300px;

1 Like


I am sure as the steps proceed it will be corrected. It could be padding, margins, borders, any of those, or something totally different.

I find your inquisitive nature to be a positive character for your progress and success.

We cannot change the steps requirements without failing them. :slight_smile:

Here are a few of FCC News Articles on centering in CSS.

Hopefully one of these can answer for you.

Happy coding! :slight_smile:


This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.