WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to get a logo infront of a header background picture (7 posts)

  1. verbors
    Member
    Posted 6 years ago #

    I am using the theme silveray.

    I am currently having trouble with putting my logo onto the header with the background pic behind it. Either the logo will block out the background or the background will block out the logo. I have no idea what to do, any help?

    Thanks

  2. paul_mcnelis
    Member
    Posted 6 years ago #

    in your header CSS you have should have something like

    h1 {background-image: url(myimage.gif);}

    then whatever text you put between h1 brackets will appear over that background.

    then there are more advanced things to do like making sure the background repeats or doesn't repeat, is size appropriately to match image, etc.

    or do you know all this already? lol

  3. verbors
    Member
    Posted 6 years ago #

    I have no problem just putting plain text over the background. My problem starts when I want to add a graphical logo to the background.

    The background is suppose to repeat to infinity or whatever but the logo isn't. However when I put the logo in, it also repeat.

  4. boober
    Member
    Posted 6 years ago #

    you need to add a header img class to your css with the style repeat: no-repeat

  5. verbors
    Member
    Posted 6 years ago #

    Um, can you help on how to do that?

  6. bestfoot
    Member
    Posted 6 years ago #

    Are you putting the logo in as a background image? Or are you putting it in the page?

    <div id="header">
    	<div id="headerimg">
    		<h1><a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
    		<div class="description"><?php bloginfo('description'); ?></div>
    	</div>
    </div>

    Put the image tag between the h1 tags in place of:
    <?php bloginfo('name'); ?>

    You may also want to delete the description div entirely.

  7. boober
    Member
    Posted 6 years ago #

    bestfoot gots it!

Topic Closed

This topic has been closed to new replies.

About this Topic