WordPress.org

Support

Support » How-To and Troubleshooting » getting header to repeat in header.php

getting header to repeat in header.php

  • 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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Tried messing with the code a bit and it still won’t work. Is it wrong or should I be using something else?

    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.

    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”>

    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.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘getting header to repeat in header.php’ is closed to new replies.
Skip to toolbar