html - Bootstrap custom navbar with images -


i tried make custom navbar since standart navbar isnt desire. looks casual try instead of using navbar, images.

i cant them 4 images line in row.

i saw there 2 types of making it, once defining class through css , other 1 directly in index.html. there difrences in 2 methodes?

help super appericated. tried 30 websites parts of code seems nothing working im wondering wrong.

greeting queen

.navbar {  max-width:960px;  text-align:center;  }    .home {  position:relative;  display: inline-block;  float:left;  padding:10px;  }    .search {  position:relative;  display: inline-block;  pading:10px;  }  .logo {  position:relative;  display: inline-block;  float:right;  margin-right:50%;  padding:10px;  }    .partner {  position:relative;  display: inline-block;  float:right;  margin-right:50%;  padding:10px;
<body>  <div class="navbar">          <div class="navbar-special">              <ul class="nav">  <li class="home"><a href="#"><img src="http://i.imgur.com/grynqfz.png" /></a></li>  <li class="search"><a href="#"><img src="http://i.imgur.com/nfurgql.png" /></a></li>  <li class="logo"><a href="#"><img src="http://i.imgur.com/siwbaop.png" /></a></li>  <li class="partner"><a href="#"><img src="http://i.imgur.com/ry9hizc.png" /></a></li>          </div> <!-- div closing navbar -->      </div><!-- div closing navbar -->  </body>

http://jsfiddle.net/n32koz7q/1/

as applys styling, there few caveats make putting styles in index.html or external stylesheet different.

putting styles in external stylesheet (everything else held constant)...

—create new http request, , external style sheet loaded after index.html page (given page requests stylesheet).

—change order @ styles applied. example, if have.

index.html:

    <html>       <head>        <link rel="stylesheet" type="text/css" href="mystyle.css">       </head>     <body>       hello world!     </body>    </html>    <style>     .body {color:black;}    </style> 

and mystyle.css:

body { color: white; } 

the body have css property of color:black, since style loaded last. you can read here.

there few other differences, these ones particular current use case.

as original question: here updated fiddle:

http://jsfiddle.net/n32koz7q/2/

you had lot of unnecessary styling. start here, , build up. basically, basic css going use elements sit inline, in case, so:

.navbar { max-width:960px; text-align:center; }  li {     display:inline-block;     padding: 10px; } 

essentially want li elements sit inline.

good luck!


Comments

Popular posts from this blog

jquery - How do you format the date used in the popover widget title of FullCalendar? -

asp.net mvc - SSO between MVCForum and Umbraco7 -

Python Tkinter keyboard using bind -