Reply To: Header Color

Homepage Community Forums Legacy Theme Support Header Color Reply To: Header Color

#2181
Eric
Customer

    The background feature is actually a WordPress feature (not really a Legacy feature)…..and its for the entire background (or “body”) of your site. There is no background “color” option specifically for the Header alone, you can only add a background image and change the text color of the header.

    In another thread, Wes recommended adding the following code to your functions.php file –


    /** Before Header Wrap */
    add_action('genesis_before_header', 'before_header_wrap');
    function before_header_wrap() {
    echo '<div class="head-wrap">';
    }
    /** After Header Wrap */
    add_action('genesis_after_header', 'before_after_wrap');
    function before_after_wrap() {
    echo '</div>';
    }

    Then add this to your style.css file –


    .head-wrap {
    background: #ff0000;
    }

    You can change the background color to whatever you want.

    The #header is only 960px width, so if you add color it won’t fill up the entire space and you would have white on the sides of the header. This is why you should add the above code since it will add a “wrap” behind the header making the background color full width.


    I create awesome sites for awesome people! Contact me if interested – ericsanchez1585@gmail.com