html - Bootstrap image not responsive -


i adding logo using bootstrap etc , background image. i'm not sure if doing right when resize window nav bar self getting smaller image in navbar not. know why?

html:

<div class="navbar navbar-default navbar-fixed-top" role="navigation">   <div class="container">     <div class="navbar-header">       <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">         <span class="sr-only">toggle navigation</span>         <span class="icon-bar"></span>         <span class="icon-bar"></span>         <span class="icon-bar"></span>       </button>       <div class="logo">         <img src="image/logo.png"/>       </div>     </div>     <div class="navbar-collapse collapse">       <ul class="nav navbar-nav navbar-right">         <li class="active"><a href="#">home</a></li>                <li><a href="#about">about</a></li>         <li><a href="#about">login</a></li>         <li><a href="#about">become member</a></li>       </ul>     </div><!--/.nav-collapse -->   </div> </div> 

css:

body {      background: url('../image/backgroundimage.jpg') no-repeat center center fixed;      -webkit-background-size: cover;     -moz-background-size: cover;     -o-background-size: cover;     background-size: cover; }  .navbar-default {     background-color: rgba(0, 0, 0, 0.65);     border-top: 0px solid rgba(0, 0, 0, 0.5);     border-bottom: 0px solid rgba(0, 0, 0, 0.5);     margin-top: 60px;     height: 80px; }  .navbar-default .navbar-nav > li > {     color: #ffffff;     font: normal normal normal 12px/1.3em 'open sans',sans-serif;     text-transform: uppercase;      padding:28px; }  .navbar-default .navbar-nav > .active > a, .navbar-default .navbar-nav > .active > a:hover, .navbar-default .navbar-nav > .active > a:focus{     color: #ffcb80;     background-color: transparent; }  .navbar-default .navbar-nav > li > a:hover,  .navbar-default .navbar-nav > li > a:focus {     color: #ffcb80;     background-color: transparent; }  .logo {     margin-left: 4em; } 

so logo div not re-sizing @ moment. have question background image, don't need resize? mine cuts out , see bits of it, etc? or bad coding?

to make images responsive within bootstrap framework need add class image tag:

  • class="img-responsive"

see bootstraps documentation further details here:

example:

<img src="image/logo.png" class="img-responsive" /> 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -