View Full Version : Use background with css?
fryman
Jan 22nd 2005, 4:12 pm
I have this:
.content {
background-color: #FBFBFB;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: xx-small;
color: #6507BD;
}
Instead of a color, I want to use a picture as my background, what do I need to change?
Thanks
fryman
Jan 22nd 2005, 4:21 pm
Never mind, figured it out :)
pinkpanther
Jan 22nd 2005, 4:39 pm
Great, just about to post an answer.. ummm, is that a real cat?
Smyrl
Jan 22nd 2005, 4:41 pm
How about posting, Fryman. I do not know the answer to your question.
Shannon
-----
Thanks, David.
david_sakh
Jan 22nd 2005, 4:50 pm
How about posting, Fryman. I do not know the answer to your question.
Shannon
background-image: url(backgroundimage.ext);
fryman
Jan 22nd 2005, 7:51 pm
Exactly
Now it looks like this:
.content {
background-image: url(http://www.mydomain.com/images/back.jpg);
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: xx-small;
color: #6507BD;
}
:)
relaxzoolander
Jan 27th 2005, 8:24 pm
you also might want to control the repeat of the background.
the default is for the background to repeat in both directions. [tiled]
other options are:
{
background-repeat: repeat-x;
background-repeat: repeat-y;
background-repeat: no-repeat; [one instance]
background-repeat: repeat; [tiled]
}
:)
nevetS
Jan 27th 2005, 9:40 pm
and...
You can set background for divs not just the body.
david_sakh
Jan 27th 2005, 9:56 pm
and table cells as well
J.D.
Jan 27th 2005, 10:04 pm
and table cells as wellGuys, background works for any element.
J.D.
david_sakh
Jan 27th 2005, 10:13 pm
Guys, background works for any element.
J.D.
not meta :p
J.D.
Jan 27th 2005, 10:38 pm
not meta :pSure you can - try it in the CSS or HTML validator :)
J.D.
HHI Golf Guy
Jan 31st 2005, 11:48 am
You can do some neat things with backgrounds. Take a look at the FSBO real estate site in my signature with your resolution at 800x600, then at 1024x768.
It's a great way to fill what can be whitespace on higher resolutions. I've seen some sites set their container to align left, then have a vertical logo showing on the right hand side only when viewing at higher resolutions than 800x600.
SEbasic
Jan 31st 2005, 11:53 am
Yeah... I played with trying to fill a little white space on seo-dev.co.uk
I've got a couple of issues with some sites I'm working on at the moment but I'll get over them soon enough....
I love playing with CSS.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.