html - Size a background image? -


i have div 200px 200px.

it's background image 500px x 500px.

is there way make sure entire background image fits div? know can size css3 i'm looking solution older browsers.

thanks

is there way make sure entire background image fits div?

the background-size property.

i know can size css3 i'm looking solution older browsers.

there no other standard way scale background image.


older versions of internet explorer can supported via non-standard filter property , alphaimageloader.

/* untested */ background-image: url(images/someimage.png); background-resize: cover; filter: "progid:dximagetransform.microsoft.alphaimageloader(src='images/someimage.png',sizingmethod='scale')"; -ms-filter: "progid:dximagetransform.microsoft.alphaimageloader(src='images/someimage.png',sizingmethod='scale')"; 

alternatively, hack, use <img> element, , absolutely position behind content. content image though, wouldn't clean hack.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -