Help - Search - Members - Calendar
Full Version: Background
DIYDating > DIY-Dating > Design Help
mikeart006
Hi, can someone please tell me how i can add my own backgound image to my sites, html i understand but css is still a learning curve ohmy.gif
rob
QUOTE (mikeart006 @ Oct 23 2006, 10:56 AM) *
Hi, can someone please tell me how i can add my own backgound image to my sites, html i understand but css is still a learning curve ohmy.gif


Hi mike,

The background attribute usually lives within the 'body' declaration.

Your style sheet should have an entry similar to this:

BODY
{
FONT-SIZE: 8pt;
FONT-FAMILY: Arial, Helvetica;
}

This css tag formats the body in your HTML document.

All you need to do is add the 'background-image' attribute like this:

BODY
{
FONT-SIZE: 8pt;
FONT-FAMILY: Arial, Helvetica;
background:url(http://www.yoursite.com/img/yourbgimage.gif) repeat #111111;
}



if we dissect the attribute:

background: declairing the background attribute

url() - put the path to your bacground image between the brackets.

repeat - this defines how you want your background image to repeat:

repeat-x repeats the image left to right only.

repeat-y repeats the image up and down only.

if you don't specify a repeat value the image will tile completely in the background.

#111111 - this is a shorhand reference to the background colour.


In a nutshell, CSS is very powerful and i would recommend that all of our webmaster familiarise themselves with the way it works. Especially considering that IE7 and Firefox2.0 offer much improved support for it over the previous generation of browsers.

-Rob- wink.gif
mikeart006
Brilliant, thanks so very much cheers Mike. wink.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.