?

Log in

No account? Create an account

Previous Entry | Next Entry

How To Change Background Images (css)

  • Sep. 3rd, 2006 at 1:01 AM
The background of the page as a whole (i.e. under the central content strip) can be changed using the body tag:

body {
background-color: #fef9d2;
background-image: url("http://www.sampleurl.com/background.jpg");
background-repeat: repeat-x ;
background-attachment: fixed ;
}

In this case, I have used a gradient background, which is a thin vertical strip image repeated in the x-direction and fixed, with the underlying colour the same as the bottom of the gradient to blend in smoothly.

You can also change the background of the sidebar(s). Use:

.layout-wt #content-inner {
background-image: url("http://www.sampleurl.com/background.jpg");
}

.layout-tw #content-inner {
background-image: url("http://www.sampleurl.com/background.jpg");
}

These two will give you background images for single sidebar layouts on the right or left respectively. You can also use these to change the background colours of them. Again, you could use gradients if you like, remembering to specify the relevant positions and repeats of the background image strip.

Comments

stickykeys633
Jul. 2nd, 2007 02:57 am (UTC)
Hello, I am using Endless Summer Tan and trying to add images/color to the sidebars. I see the code above, but I'm not quite sure where to put the code? In the custom css box, or does it go inside a function? Thanks for any help!
nimoloth
Jul. 3rd, 2007 04:49 pm (UTC)
This stuff just goes in the Custom CSS box in the Edit Journal area.
stickykeys633
Jul. 3rd, 2007 05:29 pm (UTC)
I tried and absolutely nothing worked. I also have in there the header image and the remove current header code, would the two conflict?
nimoloth
Jul. 3rd, 2007 05:44 pm (UTC)
They shouldn't conflict. What's your code?
stickykeys633
Jul. 3rd, 2007 05:49 pm (UTC)
nimoloth
Jul. 3rd, 2007 06:24 pm (UTC)
Try changing .layout-wt to .layout-wtt - it looks like your two sidebars might both be identified by that.
stickykeys633
Jul. 3rd, 2007 06:35 pm (UTC)
Actually, it looks like one of the wt's got transposed, which is odd since I copied and pasted it!

Hmm, it... kind of works... At least I can get it to show up, I'll do some more futzing around with it later. Thanks so much!

Latest Month

March 2016
S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728293031  

S2 Help Communities

Tags

Powered by LiveJournal.com
Designed by chasethestars