html - Multiple Background Images - Need just the one to cover -


i have 2 background images. first picture of trees want @ , other black box want hover on top of tree picture.

the problem i'm having when use 'background size: cover' style messes them both up. need tree picture cover , box sit on top. here's code:

    .main-image {         width: 100%;         height: 370px;         background: url('../img/main-img-black.png'), url('../img/main-img.jpg') ;         background-repeat: no-repeat, no-repeat;         background-position: 10,0;         background-size: 1, cover;       } 

i hope sort of makes sense!

per mdn background-size: 1, cover; not valid css, rule 'falls over'.

try changing to:

background-size: 10px, cover;.

if arent setting value cover, contain, auto or zero- number must followed unit type.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -