Layout Problems (Div beginner)

deno

New Member
Hi all

I'm trying to get my head around using DIV tags to layout my pages so I can move away from using frames.

What i'm trying to do is get a layout like this:

http://www.gep.co.uk/iq/test08/index3.html

Where my boxes are aligned as such and always resize to be centered in the screen.

But when i'm using DIV I get the following:

http://www.gep.co.uk/iq/test08/index.html

As I said, i'm new to this and should probably start reading up on it a little so if anyone has any good resources I could check out that would really be appreciated.

Thanks

Dene
 

Havox

New Member
Alright for this you'll have to put your entire page in a wrapper div.

The HTML should look something like.

HTML:
<body>
<div id="page_wrapper">SITE CONTENT GOES HERE.</div>
</body>

And your CSS is going to look like

Code:
#page_wrapper     { width:300px; margin-left: auto; margin-right: auto; }

You want to set a width for your wrapper div, which would be the width of your site. And then the margin-left: auto; and margin-right: auto; center it for you. Hope this helps.
 

smashwebs

New Member
Alright for this you'll have to put your entire page in a wrapper div.

The HTML should look something like.

HTML:
<body>
<div id="page_wrapper">SITE CONTENT GOES HERE.</div>
</body>

And your CSS is going to look like

Code:
#page_wrapper     { width:300px; margin-left: auto; margin-right: auto; }

You want to set a width for your wrapper div, which would be the width of your site. And then the margin-left: auto; and margin-right: auto; center it for you. Hope this helps.

+1....that should center it for you!
 
Top