|
| |
|
|
Em
Posts: 39 Joined: 12/20/2001 From: Southeastern Oh USA Status: offline
|
help! setting up an 800 wide site centered - 4/13/2008 13:30:55
Ok, I'm STUCK!! I'm missing the "how to" set up an 800 wide site that is centered on the browser page, and then has background on either side which collapses or expands based on the person's resolution size. Do you just set this up in a table that has essentially 3 columns where the middle is set at 800 pixels, and the sides then have the background? Seems so basic, but I can't find any info on how to exactly DO THIS. THANKS for any input!!! Em
_____________________________
Dancin' with waves.
|
|
|
|
rdouglass
Posts: 9269 From: Biddeford, ME USA Status: offline
|
RE: help! setting up an 800 wide site centered - 4/13/2008 13:46:44
I don't use tables for that. A liitle CSS like this... body
{
margin: 0;
}
#divContent
{
width: 800px; margin: 0 auto;
} ...a little HTML like this... <body>
<div id="divContent">
Blah, blah...
</div>
</body> That's how I do it anyways. Hope it helps.
< Message edited by rdouglass -- 4/14/2008 9:01:32 >
_____________________________
Don't take you're eye off your final destination. ASP Checkbox Function Tutorial.
|
|
|
|
Tailslide
Posts: 6116 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: help! setting up an 800 wide site centered - 4/13/2008 14:00:56
have the background image (which would be the left bit, central bit, right bit) slice and then repeat it on the body element like this: body {background: url(images/background.jpg) center top repeat-y;} as well as the stuff Roger's given you - that will repeat the sliced image down the centre of the page and will give the effect you're after.
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
|
|
Em
Posts: 39 Joined: 12/20/2001 From: Southeastern Oh USA Status: offline
|
RE: help! setting up an 800 wide site centered - 4/14/2008 8:34:39
Tailspin.. Thank you so much!!! I finally understand!! So I'm curious... why drop the 800 down to 760?? And I'm assuming that if the sample you provided is viewed at 800, only 20 pixels of the background will show on each side? And when viewed at 1024 or greater, the background image will repeat to fill the space? Thanks again!! Em
|
|
|
|
Tailslide
Posts: 6116 Joined: 5/10/2005 From: Out here on the raggedy edge Status: offline
|
RE: help! setting up an 800 wide site centered - 4/14/2008 9:08:01
It's 760 because you need to allow for the vertical scrollbars etc - it's different on each browser but 760px will be fine on all of them. The background image is repeating vertically down the page and will be as long as necessary. Width-wise - It'll be whatever width you create - the example I've used is 1000px wide. If you create a very wide image then you end up eating bandwidth so best bet is to have something not too wide - maybe fade it into the background colour and then you get a seemless effect at any width. In the example posted the background colour is white: body {background:#fff url etc etc. so just change that as necessary
_____________________________
"My strategy is so simple an idiot could have devised it" Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project
|
|
New Messages |
No New Messages |
Hot Topic w/ New Messages |
Hot Topic w/o New Messages |
Locked w/ New Messages |
Locked w/o New Messages |
|
Post New Thread
Reply to Message
Post New Poll
Submit Vote
Delete My Own Post
Delete My Own Thread
Rate Posts
|
|
|