html/css, stretchable edges.

Soldato
Joined
25 Sep 2003
Posts
3,750
Location
Manchester
I've been building a website and am having problems trying to figure out how to make the edges stretch when the browser is resized.

website.jpg


Can anyone point me in the right direction? Thanks.
 
If the 'edges' are just a background, that's easy to do. If they're going to be filled with content, I can't think of anyway to do it tbh. (one setwidth and one variable column yes - but not two)

If it's just a background... split your page up into three sections..


Code:
<div id="header"></div>

<div id="pageBodyContainer">
  <div id="pageBody"></div>
</div>

<div id="footer"></div>

body { text-align: center;}
#header { width: 500px; margin: 0 auto; text-align: left;} 
#pageBodyContainer { width: 100%; min-width: 500px; background: #333;}
#pageBody { width: 500px; margin: 0 auto; text-align: left;}
#footer { width: 500px; margin: 0 auto; text-align: left;}
 
Last edited:
Learn something new everyday.

Thanks Cuchulain, I myself have a site that needs to be done like this but that's months away so I didn't bother putting a great deal of thought into how/if it could be done. You've saved me some work. :)
 
Thanks everyone, I will give it a go. :)

There's nothing in the edges, just a background image (1px tiled horizontally as it's just some lines).
 
Last edited:
Back
Top Bottom