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.
Asked
Active
Viewed 31 times
1 Answers
0
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.

rompikapo
- 46
- 2
-
Thanks for your help!, the code works really well but the information can't be saved after refreshing the website. How could I solve this? – Katleen Carvajal Mar 12 '21 at 05:42
-
Hi Katleen, hard to say, it depends on where you put it, you should tell me a little more about the page, where you write the css, if possible also post a link, to understand what the real problem is. Anyway, first of all, try to clean all caches, browser, wordpress and server – rompikapo Mar 13 '21 at 09:01