PDA

View Full Version : Background Image Carousel background-size: cover; is not working



kerriluo
02-10-2012, 06:59 PM
I want my background image auto resize, so I set background-size: cover;

div.slide{ /* CSS for each image's DIV container within main container */
background-color: black;
background-position: top center; /* center image within carousel */
background-repeat: no-repeat;
background-size: cover; /* CSS3 property to scale image within container? "cover" or "contain" */
color: black;
}

but it's not working, is anyone know why?

ddadmin
02-12-2012, 09:19 PM
Warning: Please include a link to the DD script in question in your post, in this case http://www.dynamicdrive.com/dynamicindex14/bgcarousel.htm. See this thread (http://www.dynamicdrive.com/forums/showthread.php?t=6) for the proper posting format when asking a question.

What browser are you using to test out the CSS style? background-size:cover doesn't work in IE9 for example, though it should in all the other major browsers.

jscheuer1
02-12-2012, 10:38 PM
background-size:cover doesn't work in IE9 for example, though it should in all the other major browsers.

Works fine in IE 9 here. Doesn't work in IE 8 and less though.