css - How to adjust background image of a div? -


i can't adjust background img of div filled image, regardless of div's , img's size. if image smaller should streched , vice versa. whole image should visible, regardless of deformation , loss of quality.

i tried combinations , permutations, , many more. - doesn't work.

 background-repeat: no-repeat;  background-position: top center;  background-size: auto;  background-size: cover;  background-size: contain;  background-size: 100% 100%; 

i use firefox 22, css valid css3, according w3c validator.

this css3 only

background-size: 100% 100%; 

upd: old ie can use filters:

-ms-filter:"progid:dximagetransform.microsoft.alphaimageloader(src='imgpath', sizingmethod='scale')";  /* ie8 */ filter:progid:dximagetransform.microsoft.alphaimageloader(src='imgpath', sizingmethod='scale'); /* pre ie8 */ 

Comments