html - Simple Bootstrap site - the navigation bar keeps covering my main content. Any idea why? -


here html.

<!doctype html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>title</title> <link href="css/bootstrap.css" rel="stylesheet" type="text/css"> <link href="css/bootstrap-responsive.css" rel="stylesheet" type="text/css"> <link href="css/style.css" rel="stylesheet" type="text/css"> <!-- html5 shim ie backwards compatibility --> <!--[if lt ie 9]>       <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>     <![endif]--> </head>  <body> <div class="container-fluid">   <div class="row-fluid">     <nav class="navbar navbar-inverse">       <div class="navbar-inner"> <a class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">        <span class="icon-bar"></span>        <span class="icon-bar"></span>        <span class="icon-bar"></span>        <span class="icon-bar"></span>        <span class="icon-bar"></span> </a>         <div class="nav-collapse">           <ul class="nav">             <li class="active"><a href="#">home</a> </li>             <li><a href="#">about</a></li>             <li><a href="#">work</a></li>             <li><a href="#">resume</a></li>             <li><a href="#">contact</a></li>           </ul>         </div>       </div>     </nav>   </div> </div> <div class="container-fluid">   <div class="row-fluid">     <div class="headline">       <header class="span8">         <h1>headline goes here</h1>       </header>     </div>   </div> </div> <script src="http://code.jquery.com/jquery-latest.js"></script>  <script src="js/bootstrap.min.js"></script> </body> </html> 

in css, have nothing positioning changed or anything—just colors , spacing , whatnot. have .navbar .nav > ul property set display:box; affecting it?

let me know if need more info

here's jsfiddle, without bootstrap files: http://jsfiddle.net/6prhf

using following styles space out nav bar items, depending on how want styles can customize it. should close want hopefully.

css file

/* customize navbar links fill entire space of .navbar */ .navbar .navbar-inner {     padding: 0; }  .navbar .nav {     margin: 0;     display: table;     width: 100%; }  .navbar .nav li {     display: table-cell;     width: 1%;     float: none; }  .navbar .nav li {     font-weight: bold;     text-align: center;     border-left: 1px solid rgba(255, 255, 255, .75);     border-right: 1px solid rgba(0, 0, 0, .1); }  .navbar .nav li:first-child {     border-left: 0;     border-radius: 3px 0 0 3px; }  .navbar .nav li:last-child {     border-right: 0;     border-radius: 0 3px 3px 0; } 

similar stack overflow question

bootstrap navbar justify / span menu items occupying full width


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -