Note

Remember to check the tags, before posting a question, to see whether it's been answered already.

Quick Links

August 2009

S M T W T F S
      1
2345678
9101112131415
16171819202122
23242526272829
3031     

Layout By

branchandroot

Powered by InsaneJournal

[info]branchandroot
[info]s2completestyle

[info]branchandroot
[info]s2completestyle

How to change a header image


[info]branchandroot
[info]s2completestyle
In some themes this will be easy, in others more difficult. Let's start with easy.

Let us say you are using the Basic Black and White theme, and just want to remove the black box around the journal title and put your own banner image in the header.

To remove the black box, and make the text black, you will need the paste the following code into your custom css:

#header-text { background-color: none;
border: none;
color: #000000; }
#header-text a { color: #000000; }

If you are using a dark image and want to leave the text white, just don't use the "color: #000000" lines.

Next you need to add your image. First, check to see what size your image is, because you're going to need that. Background images do not take up any "space" by themselves, so you have to specifically tell the container to be as tall as the background image is. Let us say your banner is 300px tall.

You also need to know whether your image should repeat. Is it a big banner you just want to appear once, or is it a smaller image you want to tile? Or is it something you want to repeat horizontally in a strip? Let us say it is a big banner that should not repeat itself at all.

So the next code to paste in will look like this:

#header { background-image: url(http://imagelocation.com/imagename.jpg);
background-repeat: no-repeat;
height: 300px; }

If it had been something you wanted to repeat across, then instead of "no-repeat" you would need to put in "repeat-x". If it's something you want to repeat up and down, you put in "repeat-y".

If you have a more complex set of background images, something you want to layer, there are four header divs available for the purpose. They are, in order from outer to inner:

#header
#header-inner
#banner
#banner-inner

The specific rules you need to alter will quite likely vary a bit from one theme to another, so if you're having trouble the best thing to do is look at the stylesheet of the theme you're using and see whether, for example, you need the change the background of #header-text or the background-color. If you're still stuck, post asking for help!

Comments

From:
( )Anonymous- this user has disabled anonymous posting.
( )OpenID
Username:
Password:
Don't have an account? Create one now.
Subject:
No HTML allowed in subject
  
Message: