Page 1 of 1
Posted: Sun 12 Sep, 2004 15.38
by SteveL
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.
Posted: Sun 12 Sep, 2004 18.03
by Chris J
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?

Posted: Mon 13 Sep, 2004 07.49
by SteveL
nodnirG kraM wrote:Thank you very very much, I could kiss you! But I won't.
Aw.
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.