HTML/CSS Positioning makeing a nav bar float bottom right -
i'm trying navbar float bottom right within container
the navbar positions bottom right now, not position within container (.wrapper) code, question is, how can make position within wrapper?
site-head code in style.css:
.site-head {position: relative; display: table; width: 100%; padding-top: 50px; background: #203041 no-repeat center center; background-size: cover;}
the container code in style.css:
.wrapper { width: 100%; max-width: 1240px; margin: 0 auto; }
the nav-bar code in style.css:
a {color: #ffffff; text-decoration: none; font-weight: bold; } a:hover {color: #cc3727;} header {background: #fff; width: 100%; height: 180px; position: fixed; top: 0; left: 0; z-index: 100; background: #203041 no-repeat center center; background-size: cover;} nav {poistion: absolute; right: 0; bottom: 0; float: right;} #menu-icon {display: hidden; width: 40px; height: 40px; background: #4c8fec url(images/menu-icon.png) center;} a:hover#menu-icon { background-color: #444; border-radius: 4px 4px 0 0;} ul { list-style: none; padding: 0; } li {display: block;float: left;padding: 10px; font-family: 'proxima nova light', 'open sans', sans-serif; color: #ffffff;} .active {color: #cc3727;}
html used:
<header class="site-head"> <div class="cf wrapper"> <div class="logo"> <span class="site-logo">logo</span> </div> <nav> <a href="#" id="menu-icon"></a> <ul> <li><a href="#">home</a></li> <li>|</li> <li><a href="#" class="active">music</a></li> <li>|</li> <li><a href="#">videos</a></li> <li>|</li> <li><a href="#">social</a></li> <li>|</li> <li><a href="#">bio</a></li> </ul> </nav> </div> </header>
i have browsed few stackoverflow threads without luck. new making websites.
here jsfiddle: http://jsfiddle.net/ua9hq72g/
edit: @amit solved issue via proofreading.
edit edit: navbar positions bottom right now, not position within container (.wrapper) code, question is, how can make position within wrapper?
using correct spelling helps. jsfiddle hints when you're wrong, need tidy, , pay attention red syntax highlight.
poistion != position
nav {position: absolute; right: 0; bottom: 0; float: right;}
working fiddle
Comments
Post a Comment