WordPress.org

Ready to get started?Download WordPress

Forums

getting header to repeat in header.php (5 posts)

  1. cash89
    Member
    Posted 5 months ago #

    Trying to get my header image to repeat horizontally. I am using the echelon theme by mysitemyway. I am already usuing a background image on repeat in my theme options so I need to add the slice for my header image on repeat in the header.php file.

    This is what i have so far. Added this to the header.php file but it is not working.

    <div style = "position: absolute; top: 0px; left: 0px; width: 100%; height: 300px; background: url('http://kingeventrentalsplus.com/wp-content/uploads/2014/01/header.png') repeat;">

    I'm stuck :(

    thanks in advance

  2. cash89
    Member
    Posted 5 months ago #

    Tried messing with the code a bit and it still won't work. Is it wrong or should I be using something else?

  3. webbrewers
    Member
    Posted 5 months ago #

    The site has a similar body background so I'm not sure how adding it to the header area is going to look.
    Where are you putting this div exactly?
    I assume you're closing the div with </div>?
    I'd avoid inline styling if possible and use a class referenced in the stylesheet.
    repeat-x would be a horizontal repeat.
    If this is a premium theme, I'd ask the theme vendor / developer for more qualified advice.

  4. cash89
    Member
    Posted 5 months ago #

    Yes, the body background that is up right now I want to change to a slice on repeat instead of one large image,and I want to do it by putting it into the header.php file so I can use a bubble background image for the body, which is currently white.

    I put the code before the header inner so it would repeat across the screen, but its only showing inside the header area.

    <?php mysite_before_header();

    ?><div id="header">
    <div style = "position: absolute; top: 0px; left: 0px; width: 100%; height: 300px; background: url('http://kingeventrentalsplus.com/wp-content/uploads/2014/01/header.png') repeat;">
    </div>

    <div id="header_inner">

  5. webbrewers
    Member
    Posted 5 months ago #

    The body background is a repeating slice:
    http://kingeventrentalsplus.com/wp-content/uploads/2014/01/header.png
    I don't think you need to add another div - apply the background to the header div and the header-inner will sit on top of it.

Reply

You must log in to post.

About this Topic

Tags