View Full Version : repeating backgrounds


amanda
11-20-2005, 11:08 PM
hello, i used to be really good at this html stuff but i haven't practiced in years and i forgot how to do these things.

what is the exact code to do a repeating background?

this is my code:
<title>Women during World War II</title>
<style type="text/css">
A:link
{ text-decoration: none; color:#000000; }
A:visited
{ text-decoration: none; color:#000000; }
A:active
{ text-decoration: none; color:#000000; }
A:hover
{ text-decoration: none; color:#ffffff; }
body
{ background: #FFE401;
background-image: mainbg.jpg;
background-repeat: repeat;
}

</style>


<DIV id="image" style="position: absolute; top: 0px; left:0; width:0px;"><html>
<!-- Created by CoffeeCup Image Mapper (www.coffeecup.com) -->

<!-- Beginning of Client Side Image Map -->
<img src="main.jpg" USEMAP="#main" BORDER=0>
<map name="main">
<area name="prewar" shape="rect" coords="225,103,345,137" href="http://geocities.com/womenww2/pre.html" alt="" target="_self">
<area name="duringwar" shape="rect" coords="358,105,516,137" href="http://geocities.com/womenww2/during.html" alt="" target="_self">
<area name="postwar" shape="rect" coords="539,106,670,136" href="http://geocities.com/womenww2/post.html" alt="" target="_self">
<area name="home" shape="rect" coords="169,27,702,64" href="http://geocities.com/womenww2/index.htm" alt="" target="_self">
</map>
<!-- End of Client Side Image Map -->
</DIV>

<DIV id="image" style="position: absolute; top: 146px; left:427; width:0px;">
<table border="0" width="344">
<tr>
<td width="344">
<font size="1">
blahblah blah
</td>
</tr>
</table>
</DIV>

and this is my test page:
http://www.geocities.com/womenww2//test.html

what am i doing wrong and why isn't the bg repeating?
if anyone could help me, thanks!

starlet
11-21-2005, 01:26 AM
Amanda, wow. When I saw your name I thought someone must have bumped a thread from a few years ago! Nice to see you :D

A background will automatically repeat, you don't need to add any code for that....the correct way to set a background though is:

background-image: url(mainbg.jpg);