questions

How can I set bounds to Header image in WordPress?

Rate this post

I set the Header image on WordPress,

but when I change the size of the screen,

the image repeats itself,

and I have to place only one Header image without repetition.

 

✔️Solution:

Basically you shoud use the background-repeat css property on the element wich have the background, then you should use the background-size property to fit the image to the element, eg

.header {
background-image: url("/pth/to/your/image.jpg");
background-repeat: no-repeat;
background-size: cover;
}

.header is only an example, it could not work in your page, please write this rule with the right css path to your element, or post a link to your page for understanding how to do this rule working. Also you should need some property more to positioning the background image, or different values for each property, eg contain or auto for background-size.

Leave a Reply

Your email address will not be published.

Back to top button