PLEASE help! My position sticky is not working, please help me
Link to codepen: https://codepen.io/THEDEVELOPERBILLIONAIR/pen/eYBELgQ?editors=1100
PLEASE help! My position sticky is not working, please help me
Link to codepen: https://codepen.io/THEDEVELOPERBILLIONAIR/pen/eYBELgQ?editors=1100
Hi there, use
position:fixed;
top:0;
if you want your nav bar to always be at the top of the screen
Yes , i know that postion property but i want to use the sticky property because i want it to be there while i go down the page
position: fixed does this already.
Yes but the text under it on the web page is blocked
This is what im trying to do:
Do you see what i mean?
If you are intending this for a nav bar position:fixed works perfectly. Just add margin-top to the element so the nav-bar doesn’t cover it
AAAAAAAAAAAAAAAAAH!!! YOU DONT GET WHAT I MEAN
I see your project, just add margin-top to your text and you’ll be good.
Do this
.landing-page-nav {
background-color: #242439;
position: fixed;
top:0;
}
p{
margin-top:5rem;
}
FINALLY!! OMG!!! THANK YOU SO MUCH
You’re welcome. Using position fixed removes the element from normal flow - it floats so to speak. So you have to compensate by adding margin
This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.