WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Background image in Header to become link (4 posts)

  1. mpjohnso
    Member
    Posted 6 years ago #

    I am currently using a theme called mimbo2.2 where I have to use the header image in the background of the h1 so it shows up behind the search bar.

    See it at: EnviroHumanImpact

    The problem is that I need to be able to make the image (or part of the image) a link back to the home page like many header images in WP.

    Can anyone help me make the header background image a link?

    Here is my CSS Stylesheet code to display the image:

    h1 {
    	text-indent:-9999px;
            background: url(/wp-content/themes/mimbo2.2/images/grassheaderEHI.jpg) no-repeat;
            width: 880px;
            height: 175px;
    	}
  2. Eric Amundson
    Volunteer Moderator
    Posted 6 years ago #

    Use this instead:

    h1 a {
    	display:block;
    	text-indent:-9999px;
            background: url(/wp-content/themes/mimbo2.2/images/grassheaderEHI.jpg) no-repeat;
            width: 880px;
            height: 175px;
    	}

    Also, you'll need to fix your h1 tag to remove the extra > after the opening <h1> tag:

    <h1>><a href="http://www.envirohumanimpact.com/">EnviroHumanImpact</a></h1>
  3. mpjohnso
    Member
    Posted 6 years ago #

    you sir, are a god... it worked thanks a ton!

  4. ebart62
    Member
    Posted 6 years ago #

    mpjohnso, I like your site layout. Where did you find the mimbo2.2 theme at?

Topic Closed

This topic has been closed to new replies.

About this Topic