Image span full width of page

Community Forums Forums Design Tips and Tricks Image span full width of page

This topic is: not resolved

Tagged: ,

This topic contains 2 replies, has 2 voices, and was last updated by  rlegrys 4 weeks, 1 day ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #112051

    rlegrys
    Member
    Post count: 1

    Hi,
    I have an image that I would like to place on my homepage just below the secondary nav menu. It is a banner that would span the entire width of my page (including the sidebar area). Is there a way to put an image above where the sidebar starts? The site is http://www.healthcoachsolutions.net

    Thank you,
    Rob

    http://www.healthcoachsolutions.net
    #112053

    nunotmp
    Participant
    Post count: 164

    you can use something like this.

    
    add_action( 'genesis_after_header', 'wpz_do_banner' );
    function wpz_do_banner() {
    echo '<div class="full-width-banner">;
            echo '<img src="path/to/image.png" alt="Banner Image" />';
    echo '</div>;
    }
    

    You can then add some css to expand .full-width-banner

    
    .full-width-banner {
    width: 100%;
    }
    

    You may have to tweak the code but it should get you started. The php should go in your functions.php and the css goes in your style.css file.


    #112056

    rlegrys
    Member
    Post count: 1

    Thanks for the fast response nunotmp. Unfortunately, there must be something wrong with this code. When I put it into my functions.php, the site locks up. Nothing works at all (no dashboard or pages). Any idea what might be wrong in the code (I did change the path/to/image.png to point to the image).

    Regards,
    Rob

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.