Adding header image to theme without one

  • Author
    Posts
  • #1145681

    sophiesignin
    Member

    I’m using the Journalist v1.9 theme, which doesn’t have a header. However, I’d like to customize it with CSS, and add a header image. Is this possible or do I need to use a theme that already has an integrated header image?

    The blog I need help with is sophienovak.com.

    #1145917

    You can add a background image to an existing element with CSS. Here is an example using a logo image instead of a header image:

    #container h1 a {
    	background: url("http://s.wordpress.org/about/images/wordpress-logo-notext-bg.png") center 35px no-repeat;
    	display: block;
    	height: 175px;
    	width: 910px;
    }

    To use your own header image, upload an image that is already sized to your media library, copy the URL for the image, and replace the url() value in the example with your image URL. You will also need to adjuect the 35px in the background rule and the height and width until it looks good.

    Note that there are a few different ways to accomplish the same thing. This example keeps the site title above the header and places the background on a link element so that it will be clickable.

The topic ‘Adding header image to theme without one’ is closed to new replies.