Bulelani Botman
Explore posts from serversKPCKevin Powell - Community
•Created by Bulelani Botman on 12/27/2023 in #front-end
A Problem With Setting The <main> Content To Full Viewport!
I have a page where I was having problems with setting the navbar at the top of the viewport. I was able to fix it with setting the border-top to some 20px whenever you load the site so that the <main> content doesn't overlap with the navbar. Now in the navbar I have two links which link to the 2 sections in the <main>! Whenever I click one link the <main> overlaps the navbar which is something I don't want. I want whenver you click the link the <section> / <main> stays below the navbar as intended and doesn't overlap the navbar content.
I have a link to the codepen to see the full code. Try loading the website in the browser & notice how <main> content is below the navbar as intended but whenever you click the "work" link in the navbar the content of the <main> it overlaps. [https://codepen.io/inalelub/pen/QWobwRW]
3 replies
KPCKevin Powell - Community
•Created by Bulelani Botman on 9/25/2023 in #front-end
Having Issues With The Height Property
I wanted to know if it is appropriate declaring your height on the html element for a fresh html project, so you can work on that. I ran into an issue trying to learn how to build header's & footer's, so I wanted my footer to be at the bottom of the page while my header stays at the top & my main element have some height that fills the whole screen without it having to scroll to reach the bottom. In my codepen, if you comment out the height for the main, the footer & header collapse and become one block but I wanted them to stick to the top & bottom so I declared the height for the main element where content would sit.
Here is the link to the Codepen
2 replies