I’m running into a few problems with my solution for the Landing Page challenge. You can find the code so far on this codepen
To prevent the page title from sliding under the fixed header, I gave the main div a top margin of 50px. Strangely enough, it pushes everything down although the main div is a child of the top level div container, which holds the header, main, and footer divs. I would expect the container to stay at the top, the fixed header too, and then the main div only to start 50px from the top.
The moment I made the header div fixed, it lost its block attribute, hence it’s width attribute. However, in order to align my nav links right, I need it to have a certain width, preferable the full width of its container. But when I give it a width of 100%, it stretches out of the container. Probably because it now no longer has a container. The same with 100vw. Is there a way to specify its width without using something like 999px?
Thanks a lot,