# DIV layers and window size

**URL:** https://forum.kirupa.com/t/div-layers-and-window-size/248841
**Category:** web dev
**Created:** [January 12, 2008, 2:33am UTC](https://forum.kirupa.com/t/div-layers-and-window-size/248841 "2008-01-12T02:33:21Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![rrex](https://avatars.discourse-cdn.com/v4/letter/r/ebca7d/32.png) [@rrex](https://forum.kirupa.com/u/rrex)
#### Post date: [January 12, 2008, 2:33am UTC](https://forum.kirupa.com/t/div-layers-and-window-size/248841/1 "2008-01-12T02:33:21Z")

</div>

Hi everyone,

I’ve got my container DIV layer with a width of 100% so it resizes when the visitor resizes their window. However, I have a background image which I’d like DIV layers within the cointainer to stay confined to. So, for example, when someone resizes the window, the content stays in the same position over the background image, but remains centered on the page even when they resize.

Here’s an example: [http://www.makeyouhip.com/TEMP/spohn/test.htm](http://www.makeyouhip.com/TEMP/spohn/test.htm)  
as you can see, the way I have it, the content slips out of the place I’d like them to stay.

Any help would be greatly appreciated!

R:trout:
