I am a super beginner running through a practice project on my own VS. Currently I am attempting a simple header that accomplishes 2 things:
- aligns to the center of the page (text-align: center)
- stays at the top of the page when scrolling (position: fixed)
The text-align property works as expected, but when I also include the position: fixed, it shoves my header back to the left side of the page. I am sure there is a very easy and obvious explanation for this, but I must have missed something in the lesson. Can anyone help? Thank you in advance!
Here is the HTML section:
< header> <h1>Style Guide</h1> < /header>
and the CSS: