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

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -