HTML/CSS Stay in header -
hey guys possible make navigation bar stay in header no matter padding? coz want make site title , menu in 1 line , thought padding that...
#banner { background-color: #d3135a; height: 120px; margin-bottom: 4%; } h1 { float: left; padding-bottom: 6%; } #pav { font: trebuchet ms; float: left; padding-left: 4%; margin-top: 4%; } #menu_virsut li { display: inline; } #menu_virsut { float: right; margin-top: 5%; padding-right: 4%; padding-bottom: 2%; padding-top: 1%; }
<header id="banner"> <h1>the site</h1> <nav id="menu_virsut"> <ul> <li><a href>menu link</a> </li> <li><a href>menu link</a> </li> <li><a href>menu link</a> </li> </ul> </nav> </header>
a simple way alignment set same line-height h1
tag , container. href
tags don't have link. "#" put if don't want link go anywhere.
jsfiddle: http://jsfiddle.net/9vwjbq8n/
#banner { background-color: #d3135a; height: 120px; margin-bottom: 4%; } h1 { float: left; line-height: 120px; } #pav { font: trebuchet ms; float: left; padding-left: 4%; margin-top: 4%; } #menu_virsut li { display: inline; } #menu_virsut { float: right; line-height: 120px; }
Comments
Post a Comment