View Full Version : Self Expanding Div

12-18-2007, 10:54 PM
I need the code for a div with this background:http://prorshelp.4t.com/link bg.bmp (http://prorshelp.4t.com/link%20bg.bmp). and when the content inside the div expand, so does the middle part of it. Any help?

12-18-2007, 10:57 PM
I get a 403 Forbidden on link.

12-18-2007, 11:16 PM
Never use a .bmp for your images. Use a PNG or GIF file.

HTTP 403 here, too

12-19-2007, 12:11 AM
Little experiment here:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<meta name="" content="authored by http://nopeople.com/Design" />
<style type="text/css">
html, body {
background: #CCCCCC;
* {
margin: 0;
padding: 0;
border: none;
#container {
border: 4px solid #FF9900;
<div id="container">
<p><img src="http://ezwebtek.com/stick.jpg" width="100%" height="100%" alt="description goes here" /></p>
<!--end container--></div>

Though it's not a background...

12-19-2007, 12:13 AM
Have a look at this example - http://nopeople.com/CSS/background_image_resize/

One major drawback is how bad the image can be distorted depending on what size the end users browser is opened to.