News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

How do i valign a background?

Started by Acf, November 01, 2003, 03:34:55 PM

Previous topic - Next topic

Acf

I am trying to make a background width 100% with no repeat and valigned at the bottem... :-[
i have  been trying all day now and cannot seem to get it work :'(
**Removed**

Does anyone know how to do this?

*acf
Sigh...

[Unknown]


Acf

#2
.top {

border : 0px; 

width : 100%;

background-repeat: no-repeat;

background-position: 0% 0%;

background : url(
**removed**
);

}

ive tried that but it didn't seem to work :(
Sigh...

[Unknown]

I would use background-position: top top; backgrund-repeat: no-repeat;...

Also, since background is a shorthand property, you have to put it before the other two.

-[Unknown]

Acf

#4
Thanx unknown that seemed to work :)

.top {

border : 0px; 

width : 100%;

background : url(
**removed**
);

background-position: bottom bottom;

background-repeat: no-repeat;

}

only now i have to find how to get the background to span 100% of the cels :)
Sigh...

[Unknown]

background-position: bottom left;
background-repeat: repeat-x;

-[Unknown]

Acf

Quote from: [Unknown] on November 01, 2003, 04:52:05 PM
background-position: bottom left;
background-repeat: repeat-x;

-[Unknown]

thanx :D you just made my day :)
Sigh...

SparkieGeek

Instead of using the general background property, you should use background-image: url(blahblah) :)

Acf

Quote from: SparkieGeek on November 01, 2003, 05:16:03 PM
Instead of using the general background property, you should use background-image: url(blahblah) :)

Its valid so why change it?
Sigh...

Tyris

I think for general purpose you'd use background-image...
coz the background command sets the image to blah or whatever, and everything else to 0 or null... then they are overwritten... it works tho.

Acf

#10
Quote from: Tyris on November 02, 2003, 07:11:28 AM
I think for general purpose you'd use background-image...
coz the background command sets the image to blah or whatever, and everything else to 0 or null... then they are overwritten... it works tho.

I did now that but if you are not using a background collor in the same css it doesnt matter what i use.

(
**removed**
l freaking wierd css test i made a while ago :P )
Sigh...

SparkieGeek

Quote from: </Acf> on November 02, 2003, 06:48:39 AM
Quote from: SparkieGeek on November 01, 2003, 05:16:03 PM
Instead of using the general background property, you should use background-image: url(blahblah) :)

Its valid so why change it?

You're right, it is valid, and will work just fine. I guess I was just trying to make you aware of background-image.

* SparkieGeek thought using background-image was more consistent with the rest of your background CSS code
If you wanted you could of course use the background property to set all of the properties in one line like this..

background: url(http://www.theclash.zenid.net/aliencowfarm/catbg3.jpg) repeat-x bottom left

Acf

hmm that one line code looks cool :P might use it some time :)
Sigh...

Advertisement: