Avoid Image width and height distraction with CSS.
Hi! Hope everyone is fine! Today i am going to share how to avoid image distraction with CSS.Have a look below code and it will do magic! Here is your HTML code, <a href="#" class="img-thumbnail"> <img src="image1.jpg" /> </a> Here is you CSS code, .img-thumbnail{ background: none repeat scroll 0 0 #111111; display: inline-block; height: 160px; overflow: hidden; width: 200px; } .img-thumbnail img { width: 100%; }