css - Image width 100%, no horizontal scroll -


i have image set 100% width, working correctly. however, image produces horizontal scroll bar equal full width of image (1366 in case). i've tried overflow:hidden; it's doing nothing. how kill white space/horizontal scroll bar? thanks.

.header-image-inner img {     overflow: hidden;     width: 100%; }  <div class="header-image-inner">     <img width="1366" height="422" alt="banner" src="http://216.227.216.66/~mercantileportag/wp-content/uploads/2015/10/home_bannerimage1.png"> </div> 

the overflow needs applied container element, not element itself. example:

.header-image-inner{     overflow: hidden; }  .header-image-inner img {     width: 100%; } 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -