html - centering problems with bootstrap framework -


i'm noticing when attempt center image, right on page. causing that? seems there margin added left of image.

<head>          <meta charset="utf-8">          <title>test</title>          <link rel="stylesheet" href="http://flip.hr/css/bootstrap.min.css">  </head>   <body>  <div class="container">         <img src="dovelow.jpg" alt="dove">  </div>        </body> 

the margin-left: auto; on containter causing that.

you should this:

.container {     width: inherit;     text-align: center;     background-color: pink; }  img {     width: 100px;     height: 100px; } 

see http://jsfiddle.net/yuhjq/1/


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -