This topic is: not resolved
- This topic has 23 replies, 3 voices, and was last updated 10 years, 6 months ago by .
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.
These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.
Community Forums › Forums › Archived Forums › Design Tips and Tricks › Genesis Framework – Custom Header for DIfferent Pages
I submitted a ticket to StudioPress' support
K
The CSS code should really go at the end of the file.
I tested the header right widget and it worked fine for me.
This was a helpful discussion. I used Brad's CSS method for changing the background of the header on the home pages but it took me a while to understand that the order in which the statements appear in the CSS file is important.
Brad's method, which also appears here (http://wpsites.net/web-design/using-different-headers-on-different-pages-of-the-genesis-2-0-sample-theme/#comment-47723) is as follows:
.site-header {
background: #004A7F;
height: 164px;
overflow: auto;
margin: auto;
}
.home .site-header {
background: #FF6A00;
height: 262px;
overflow: auto;
margin: auto;
}
I initially made the mistake of writing the properties for the ".home .site-header" class above the properties for the ".site-header" class in my CSS file. This of course caused the CSS I wrote for the home page to be immediately overwritten by the CSS I had intended the other pages because the ".site-header" class appears in both sorts of pages. The right way to do it is the way it is shown above, with the properties for the ".home .site header" class appearing below the properties for the ".site-header" class in the CSS file. As long as no other conflicting ".site header" properties appear below it, you're good to go.
I had thought that the ".home" class wasn't picking out the home page. It was, but the properties for the site header had been overwritten. Duh! But that's how you learn I guess.
Thanks for the help, Brad!
Oh, yeah. And one more thing...
I included a background image in the ".site-header" class but not in the ".home .site-header" class. But having already put the background image in the former, it's not enough to not specify an image in the latter; you have to cancel out the property in the latter by specifying "background-image: none;"
© 2024 WPEngine, Inc.