CSS backgrounds

Whenever i choose an image from my files and want to use it for a Css backgrounds, the image shows in multiple forms and i want it to be a single image, Please what do you think am doing wrong

When an image is smaller than the container it’s forming the background of, it by default gets tiled in all directions. You have a few options depending on what you want to do.

If you just want it to be the single background on its own filling the container, then you need to define the image width and height to be the same as the container. Or else if you want it smaller, but not repeating you can add the property background-repeat: no-repeat. You can find more on this property here.

Thanks Adam. I will try that

1 Like

background-size may also be a CSS property that would be useful, in this instance.

1 Like