View Full Version : Background-Image


Duke Matthew
10-01-2004, 04:57 PM
ive tried using a few different code examples froma few websites for a background image but none seem to work, they probably do so i guess it must be me. My styling sheet is (its external)
a:link { font-family: comic sans ms;
font-size: 10pt;
color: #0033cc;
font-weight: normal;
text-decoration: none;}

a:visited { font-family: comic sans ms;
font-size: 10pt;
color: #FF0000;
font-weight: normal;
text-decoration: none;}

a:active { font-family: comic sans ms;
font-size: 10pt;
color: #0033cc;
font-weight: BOLD;
text-decoration: none;}

a:hover { font-family: comic sans ms;
font-size: 10pt;
color: #00CCFF;
font-weight: normal;
text-decoration: underline;}

h1 {font-family: comic sans ms;
color: #000000; }


p {font-family: comic sans ms;
color: #000000; }

Id appriciate it if anyone would be able to tell me what code to use and where to put it in. Thanks:) :) :)

kittycat
10-01-2004, 09:36 PM
body {
background-image: url(bg.gif);
}
Just change bg.gif to the correct name of your file. You can just have the file name or include the full url.
Stick that in the stylesheet anywhere so long as it's not between the {...} of any section.

Duke Matthew
10-02-2004, 07:40 AM
body {
background-image: url(bg.gif);
}
Just change bg.gif to the correct name of your file. You can just have the file name or include the full url.
Stick that in the stylesheet anywhere so long as it's not between the {...} of any section.

YAY it worked ty!:)

Duke Matthew
10-02-2004, 06:12 PM
eeep! Wont anything over ride that code?

Rosey
10-02-2004, 06:40 PM
what do you mean?

Duke Matthew
10-02-2004, 09:53 PM
what i mean is that the code cant be overidden by the code in the <body> tag of the page:( ie. on one page the background was black as defined in the <body> tag but it has been overidden by the image background :( Any hints to get round this?

Rosey
10-02-2004, 11:21 PM
you can set a background color or was it an image?

Duke Matthew
10-03-2004, 09:51 AM
the background before was a colour

kittycat
10-03-2004, 03:35 PM
I think internal stylesheets can override external ones, and if you applying the style inside a tag overrides all... if you have bgcolor="#000000" in the tag try seeing if it makes a difference using style="background-color: #000000;" or make a small internal stylesheet with that code.

Duke Matthew
10-04-2004, 07:28 AM
okie thanks ill give it a go:)