html - Fit image in DIV on Internet Explorer 8 -


i need show image fits in div tag. code works fine in chrome when visualize on internet explorer 8 cropped image. code

  .grid{     background:url('./images/grid.png');     background-repeat:no-repeat;     width:730px;     height:647px;     background-size: contain;     background-size: 100% 100%; }   
<div id="pointer_div" onclick="point_it(event)" class="grid"> ... </div> 

don't know if helps gotta use

<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> 

the attribute background-size doesn't work in ie8.

you should try add <img> tag inside div , use max-width: 100%; on <img>.

http://caniuse.com/background-img-opts


Comments

Popular posts from this blog

c# - How Configure Devart dotConnect for SQLite Code First? -

java - Copying object fields -

c++ - Clear the memory after returning a vector in a function -