javascript - Image size incompatible with different browsers -


i created css style in .img element website: www.piyarawatan.com in right side bar of webpage, there preview image of newspaper beneath search box. when open web page in firefox, working , image size need when open same web page in google chrome, image height stretches long , width shrinks. problem? there problem in css? how can fix it. thanks

img[attributes style] {     height: 150%;     width: 100%; }  li {     display: list-item;     text-align: -webkit-match-parent; } 

you should not put width , height attribute in <img>-tag. add class image element this:

<img class="some-name" /> 

and add following css:

.some-name {     width: 100%; } 

i.e. remove width , height image element, , add css class explained above. doing width: 100% force regarded element inherit max-width of parent element.


Comments

Popular posts from this blog

inversion of control - Autofac named registration constructor injection -

verilog - Systemverilog dynamic casting issues -

ios - Change Storyboard View using Seague -