I've the following HTML-Markup for my fullscreen-navigation:
<div class="container">
<nav>
<section class="navabout">
ABOUT
</section>
<section class="navphotography">
PHOTOGRAPHY
</section>
<section class="navdesign">
DESIGN
</section>
</nav>
</div>
And the CSS for my navigation is:
.container > nav{
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
}
.container > nav > section{
width: 33%;
height: 100%;
display:inline; <-- makes the fault!!!
}
.container > nav > section.navabout{
background: url(http://eofdreams.com/data_images/dreams/face/face-01.jpg) no-repeat center;
background-size: cover;
}
.container > nav > section.navphotography{
background: url(http://www.digitaltrends.com/wp-content/uploads/2010/02/digital-camera-buying-guide-header.jpg) no-repeat center;
background-size: cover;
}
.container > nav > section.navdesign{
background: url(http://media.peugeot.com/images/backgrounds/design/concept-peugeot-design-lab.jpg) no-repeat center;
background-size: cover;
}
The problem here is, that the navigation is listed under each other like that:
- ABOUT
- PHOTOGRAPHY
- DESIGN
And because I've the height of one element set to 100%, I can't see the other two.
So to make a horizontal list order, I set display:inline;
to the .container > nav > section
part. It works, but the list element won't be height 100% anymore.
So how can I achieve my goal?
Codepen Demo (Just set display:inline;
to .container > nav > section
to see what I don't want to have)