HTML CSS examples for CSS Widget:Nav Bar
CSS - trying to keep the links inside the top nav on browser resize
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <style id="compiled-css" type="text/css"> #navWrapper {<!--from w w w .j av a 2 s. c om--> background-color:Chartreuse; margin-left:21px; margin-right:21px; border-top-right-radius:0px; border-top-left-radius:0px; border-bottom-right-radius:31px; border-bottom-left-radius:31px; margin-top:0 auto; } #navContent { width:100%; height:66px; } #navContent #logo { width:201px; float:left; display:inline; margin-left:31px; margin-top:16px; } #navContent #menu { height:26px; float:right; display:inline; border:2px solid yellow; margin-right:31px; margin-top:16px; } .item { float:left; position:relative; padding-left:11px; } .item a { color:blue; } </style> </head> <body> <div id="navWrapper"> <div id="navContent"> <div id="logo"> <img src="https://www.java2s.com/style/demo/Google-Chrome.png"> </div> <!-- #logo --> <div id="menu"> <div class="item"> <a href="">Lorem </a> </div> <div class="item"> <a href="">Lorem </a> </div> </div> <!-- #menu --> </div> <!-- #navContent --> </div> <!-- #navWrapper --> </body> </html>