Combine elements in CSS to change background in a specific page
-
I am trying to combine more elements in the CSS block, to add a the background image only in a specific page.
If I add a page ID to the code, only the first parameter is overtaken.
Is it not the correct syntax or have I to write 2 separate CSS sets?body.page-id-9,
.site-header.page-id-9 {
background-image: url(“image url”);
background-position: center center;
background-size: cover;
background-repeat: repeat;
background-attachment: fixed;
}With this code, the background of the header doesn’t change. If I enter only body,.site-header {
it works correctly on all pages.
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Combine elements in CSS to change background in a specific page’ is closed to new replies.