Code123 Code123 - 3 months ago 10
CSS Question

Background image repeating horizontally for one row

So this is some of the code I have:

html{
background-image: url(blue.jpg);
background-repeat: no-repeat;
background-repeat-x: no-repeat;
background-size: cover;
}


However, the image is repeating horizontally for the top row. After the top row, the image covers the page, with the top part being covered by the repeating first row.

What am I doing wrong?

Answer

You use:

background-image: url(blue.jpg) no-repeat;