HTML code

SteveL
Posts: 81
Joined: Fri 22 Aug, 2003 18.47

I don't think you can do it purely in HTML, you can however in CSS. If you put the following code into the header of your webpace, it should do the trick.

Code: Select all

<style type="text/css">
body {
background-image:url(gradback.gif);
background-repeat:repeat-x;
}
</style>
Change gradback.gif to the URL of your background image, and change repeat-x to repeat-y if you want it to repeat vertically instead of horizontally.
Chris J
Posts: 26
Joined: Fri 15 Aug, 2003 18.36
Location: Great Britain

You can also reduce the code in your <body> tag furthur by using the following code...

<style type="text/css">
body {
background-image:url(gradback.gif);
background-repeat:repeat-x;
background-color:#0B71D7;
margin:0px;
}
</style>

The italiced text will set the colour you want the rest of the page to be, and the bold text replaces topmargin="0", leftmargin="0", rightmargin="0" and bottommargin="0", reducing your code and page size by a kb or two. Just remember to rip out the rest of the body tag, leaving just <body>.

Can you tell I've been bitten by the CSS bug? ;)
SteveL
Posts: 81
Joined: Fri 22 Aug, 2003 18.47

nodnirG kraM wrote:Thank you very very much, I could kiss you! But I won't.
Aw. :cry:

You might want to convert the site into CSS, it's so much easier being able to define classes once, instead of having to put font and other formatting tags around everything.
Please Respond