Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

mikes63737

macrumors 65816
Original poster
Jul 26, 2005
1,160
357
I'm trying to make a div be the width of the page, minus 200 px on each side.

So, on a 1000 px wide display it would be like this...
|--200px--|-----------600 px----------|--200px--|


And on a 2000 px wide display it would be like this...
|--200px--|-----------------1600 px----------------|--200px--|


How can I do this without it flowing over the edge of the page?
 
Just basing this off hand, but one idea,

Code:
div {
 left: 200px;
 right: 200px;
}

This is just a starter piece, but I think it would be an easy effort.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.