See this CodePen: http://codepen.io/anon/pen/KypbC.
HTML
<body> <nav> <ul> <li>One</li> <li>Two</li> <li>Three</li> </ul> </nav> </body> CSS
body { font-family: "Helvetica Neue"; } nav { height: 50px; background-color: #EEE; /* border: 1px solid #DDD; */} nav ul li { display: inline; padding: 20px; line-height: 50px; } .nav-inverse { background-color: black; color: lightGray; } I know it has something to do with the line-height property, but don't understand how it works.
Edit: I've read through the documentation of line-height, but don't understand it.
- What is a "line box"?
- What makes an inline element "replaced" vs. "not replaced"? ...