I'm having trouble with this one.
This code works, but CSE complains about dupe declarations.
Code: Select all
#slider{background:url(/images/dc_slider_bg.jpg) 0 0 no-repeat;background-size:cover}
This validates, but does not work (it's the only place I figure where to put it):The "background" shorthand property and the "background-size" property have both been used. The "background" shorthand property already defines the following properties: "background-attachment", "background-color", "background-image", "background-origin", "background-position", "background-repeat", and "background-size". Therefore, the "background-size" property has been defined twice. Use of the "background" shorthand property is encouraged over the other background properties because it's more widely supported and it's quicker to type.
Code: Select all
#slider{background:url(/images/dc_slider_bg.jpg cover) 0 0 no-repeat}
Code: Select all
#slider{background:url('/images/dc_slider_bg.jpg' cover) 0 0 no-repeat}
Looks like it needs to be two separate statements based on what I'm finding to work.The quoted value for "url" contains the extra text "cover" between the quoted value and the right parenthesis. This extra text is not allowed (but optional whitespace is allowed).
This isn't much help: http://www.w3schools.com/css/css3_backgrounds.asp