html - Fixed image in a div -


i'm trying make 3 <div> boxes fixed height , width of 500px;

i'm trying take 3 different images , have them fit inside <div> boxes

i've tried fit image off tumblr lets say, or imgur , images fit random size, don't stretch full of <div> box.

so have;

<div class="row">     <div class="col-md-4 portfolio-item">         <div class="caption">             <div class="caption-content">                 <i class="fa fa-search-plus fa-2x">tstmkr</i>             </div>         </div>         <img src="http://goo.gl/2gdupt" class="img-responsive" alt="" />         <!-- </a> -->      </div>  </div>   #portfolio .portfolio-item .portfolio-link .caption .caption-content {     position: absolute;     top: 50%;     width: 100%;     height: 20px;     margin-top: -12px;     text-align: center;     font-size: 20px;     color: #fff; }  #portfolio .portfolio-item .portfolio-link .caption .caption-content {     margin-top: -12px;  } 

don't put image in <div> directly.
put background-image, set background-size: cover;
way, image stretch cover full <div> box, want.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

thorough guide for profiling racket code -