CSS code for changing the header image
-
What is the CSS code for adding different header images on pages? Does the code go in “Customization”, CSS?
The blog I need help with is: (visible only to logged in users)
-
Hi there, we can do this. The following is for your Services page. I randomly pulled an image from your Media Library for the example.
.page-id-87 .custom-header-media .wp-custom-header img { visibility: hidden; } .page-id-87 .custom-header-media { background: url('https://bellenesia.files.wordpress.com/2017/08/cropped-digital-camera-349873_1280.jpg') no-repeat scroll center top / cover; }To do this on a page-by-page basis, you need to use the unique page id CSS class from the opening body html tag for the particular page. In this case it is 87. You can find that using the Web Inspector built into your browser.
-
-
- The topic ‘CSS code for changing the header image’ is closed to new replies.