Skip to content Skip to sidebar Skip to footer

Html Positioning: Overlap Between Navigation Bar And Text

It's so basic but I don't seem to be able to get it right. Part of the body text that follows after the navigation bar gets positioned underneath the navigation bar. Also when ther

Solution 1:

Your navbar is fixed, means that it stays above all content except there is content with a higher z - index which has absolute or fixed position.

Just add a margin-top to your body as much as the navbar has heigh. All your content should stay below the navbar then.

Solution 2:

if you are setting it to absolute. you may need to give width as 100% I basically moved the entire nav to header tag and defined like this

header{
    position: absolute;
    z-index:2;
    width: 100%;
}

Post a Comment for "Html Positioning: Overlap Between Navigation Bar And Text"