WordPress.org

Ready to get started?Download WordPress

Forums

please help: header - change width (4 posts)

  1. pro_shine81
    Member
    Posted 7 years ago #

    Hello everybody!

    My website is: http://www.yochitosway.de

    I am currently modifying a theme and would like to span the header background image over the whole site - but I have no idea how to do this.

    The header image is called header_bg.gif and is loaded through a css file:

    #header {
    width: 100%;
    height: 118px;
    background: transparent url(images/header_bg.gif) repeat-x left top;
    }

    Now it says 100%, but still the image is not shown over the whole page.

    How can I change this?
    Thanks for your help,
    with best regards!

  2. jabecker
    Member
    Posted 7 years ago #

    chances are good that the header div is inside a container div that controls the width of your whole site.

  3. pro_shine81
    Member
    Posted 7 years ago #

    Thanks for the quick answer! But...

    I went through the php files and the css file and the whole things seems to be like that:

    In the style.css file is a div container called outline:

    #outline {
    width: 855px;
    margin: 0 auto;
    padding: 0;
    background: #fff;
    font-size: 1.3em;
    }

    plus the predefined header:

    #header {
    width: 100%;
    height: 118px;
    background: transparent url(images/header_bg.gif) repeat-x left top;
    }

    In the header.php it says:

    <body>
    <div id="outline">

    <div id="header">
    <div class="blogtitle">
    <h1>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></h1>
    </div>
    </div> <!-- end of #header -->

    Now if I change the width of outline to 100% everything is stretched to 100%, but I just want to have the header_bg.gif changed to 100%.

    How can I change this?
    Cheers!

  4. jabecker
    Member
    Posted 7 years ago #

    If you move the line:

    <div id="outline">

    underneath the line:

    </div> <!-- end of #header-->

    that will move your header outside of "outline" so that the width of outline doesn't apply to header.

    Note that this might screw up other things in your theme. But if it does you can always move it back.

    You should also validate.

Topic Closed

This topic has been closed to new replies.

About this Topic