I have been messing around trying to figure out some basics of html/css. I have a tan background with a white table. I want the background only to show up on the left and right sides(table is centered). The problem is the background is showing up on the top and bottom also. Why is it doing this? How can I fix it?

<html>
<head>
    <title>test page</title>

    <style>
        body { background : url(images/tan-sponge.jpg) tan }
    </style>
</head>

<body>

<div align="center">
<table style="height: 100%;" valign="top" bgcolor="#ffffff" border="0" cellpadding="0" cellspacing="0" width="752">
    <tr>
        <td>
        </td>
    </tr>
</table>
</div>

</body>
</html>
<style>
    body { 
      background : url(images/tan-sponge.jpg) tan;
      margin:0px; 
      padding:0px; 
    }
  </style>

Thanks :-) I got so much to learn.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.