?

Log in

No account? Create an account

Previous Entry | Next Entry

Hi, I'm new to LJ and i've been fiddling around with the code for the background for a few days.  I've got a background image i'd like to use, but the problem is i want it to stretch to 100% of the width of the page.  I'd rather not adjust my image size, because I don't quite know how many pixels to make the image so it's big enough to take up the whole page, and besides, some browsers are bigger than others. 

I'm using:
- Browser: Firefox (IE on occassion)
- Account: Plus Account
- Style: Expressive - Haunted House
- Journal: just my normal user journal you get to by clicking on my username

I've got the following code at the moment.

/* background image */
body {
    background-color: #111111 !important;
    background-image: url("http://i39.tinypic.com/2uhs8kn.jpg");
    background-repeat: repeat-y !important;
    background-attachment: scroll !important;
    background-position: center;
    }
I want to know if there is a code that will let me stretch my image so that it will take 100% of the width of the page. instead of having to specify a specific size for it. 

Thanks

Comments

( 2 comments — Leave a comment )
av8rmike
Mar. 28th, 2009 03:41 pm (UTC)
There isn't really a way to do that in CSS2.1, the current CSS implementation that most browsers support. You can only position an image and change the tiling. CSS3 includes auto-sizing of background images, but browser support for it is limited at the moment.
minuit_mystique
Mar. 29th, 2009 12:57 am (UTC)
thank you,

i'll just have to make alternate arrangements for now :)

( 2 comments — Leave a comment )

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