PDA

View Full Version : About html...


dementia
12-14-2003, 10:46 PM
How would you go about making an image you have the background of a website in HTML?

Thanks in advace

Matrix
12-14-2003, 11:04 PM
It depends. For tables, css and divs are different than the page background.

Put the following code in your <body> tag:


background = "http://thesite/image.gif"

So it will look like:

<body background = "http://thesite/image.gif">

Thats just the basic way of doing this. You can do more advanced stuff like reapeatation in X or Y coordinate, or absolutely no repeat, positioning etc...

Gummy
12-14-2003, 11:11 PM
i forgot how to do the attachment

where the background pic dont move when you scroll down the page

Matrix
12-15-2003, 09:37 PM
You can do that using css. You can either use a class and a css property, or just simply use the style property of the body tag.

Heres the simplest method:


<body style = "background-attachment: fixed; background-image: url(http://thesite.com/image.jpg);>

Gummy
12-16-2003, 03:12 AM
thanks

Matrix