Click to See Complete Forum and Search --> : stretch background image


mr_jpt
11-13-2006, 02:59 PM
Hi,
Does anybody have any ideas on how to stretch a background image using css? I've been told it's not possible. Also, I've seen code that uses divs. They claimed that div will work, but my problem is I am using a "floating page" design and can't seem to get the div to work. Here is the code for the floating page:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Floating Table Format</title>
<style type="text/css">
<!-- Sets "desktop" color (behind page) -->
body { background-color: #B0C4DE; }
</style>
</head>
<body>

<!-- /Body container -->
<!-- (background = border, padding = border width
margin = centered table) -->
<table border="0" cellpadding="4px" cellspacing="0"
style="background-color: black;
margin: 0 auto;">
<tr>
<td>

<!-- Floating page -->
<!-- (padding = page margin) -->
<table border="0" cellpadding="5px" cellspacing="0"
width="732px" height="900px"
style="background-color: #FFFFFF;">
<tr align="left" valign="top">
<td>

<!-- Page content -->
<p>Content goes here.<p>
<!-- Page content -->

</td>
</tr>
</table>
<!-- /Floating page -->

</td>
</tr>
</table>
<!-- /Body container -->

</body>
</html>

Any help would be appreciated.
Thanks! ~jt

Kravvitz
11-13-2006, 07:17 PM
Check out this demo: http://www.cssplay.co.uk/layouts/background.html

mr_jpt
11-14-2006, 01:56 PM
Thanks! That looks good. I will give it a try and post later. Thanks again!