sac7e
sac7e

Reputation: 91

bootstrap navbar margin-bottom doesn't work

When I inspect this example from bootstrap, I find that the margin-bottom in navbar does not separate the navbar and the container.

Upvotes: 2

Views: 1592

Answers (1)

Jitesh Yadav
Jitesh Yadav

Reputation: 419

That's because the navbar is fixed positioned and when you specify some element to be positioned fixed or absolute you are removing that item from document flow hence no effect on subsequent container. Try removing position:fixed on inspect from nav and you will see margin bottom in effect.

Upvotes: 3

Related Questions