euclid Posted July 3, 2020 Share Posted July 3, 2020 Site URL: https://advantage-writing.com/ Is it possible to conditionally format the site header? More specifically, I am working on a site where most pages have a dark theme with a light header, but on the Home page and Contact pages I would love to have a dark header with light body theme. Is there a custom CSS trick to conditionally apply color changes to certain pages but not others? Thanks. https://advantage-writing.com/ and the password is 'langley' Link to comment
tuanphan Posted July 5, 2020 Share Posted July 5, 2020 With body, I guess you can edit section > then change color with header, add this to Page Settings > Advanced > Header <style> .header-announcement-bar-wrapper { background: black !important; } </style> Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!) Link to comment
euclid Posted July 13, 2020 Author Share Posted July 13, 2020 Thanks. This approach does not allow me to change the header color on SOME pages but not ALL. Is there a way to do this conditionally? For example: set the header color to white by default but set the header color to black on ONLY the contact page? Link to comment
rwp Posted July 13, 2020 Share Posted July 13, 2020 Use the body id tag Example, your home page is <body id="collection-5ef60fecba0edc301161225b"> so for css use #collection-5ef60fecba0edc301161225b .header______________________ { } Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.