html - Centered Top Navigation Menu with 2 Elements -
hi i'm encountering absolute stupid problem. iam designing website center includes 2 elements, logo , navigation icon. between these 2 things should space if site resized due low resolution or mobile device.
but overlapping constantly! have no idea do... current markup:
<div id="navcontainer"> <div id="topnav"> <div id="logo"><img src="images/logo.png"/> </div> <div id="mobilenav"><a href="#" ><img id="hamburger" src="images/navicon.png"></a></div> </div>
and styling:
#navcontainer {margin:0 auto;} #navcontainer:hover{background: rgba(255,255,255,0.2);cursor: pointer; width:100%;} #topnav{width:50%; margin:0 auto;} #logo{text-align:left; min-width:250px;} #mobilenav{text-align:right; position:relative; bottom:50px; } my goal navigation working like: http://www.teehanlax.com/
i think adding more need to. if take out logo , mobilenav divs , float link tag right you'll you're looking for.
<div id="navcontainer"> <div id="topnav"> <img src="images/logo.png" /> <a href="#"><img id="hamburger" src="images/navicon.png"/></a> </div> </div> a{ float:right; }
Comments
Post a Comment