Web Design Forum  
 
Go Back   Web Design Forum > Web and Graphic Design > Web Design

Reply
 
LinkBack Thread Tools Display Modes
Old 08-02-2008, 03:13 PM   #1 (permalink)
New Member
 
Join Date: Aug 2008
Posts: 5
Default Layout Problems (Div beginner)

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
deno is offline   Reply With Quote
Old 08-02-2008, 04:04 PM   #2 (permalink)
New Member
 
Join Date: Aug 2008
Posts: 5
Default

I have a perfect example of what i'm hoping to achieve:

http://www.feederweb.com/

Thanks

Dene
deno is offline   Reply With Quote
Old 08-02-2008, 04:47 PM   #3 (permalink)
New Member
 
Join Date: Jul 2008
Posts: 17
Default

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

The HTML should look something like.

HTML Code:
<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.
Havox is offline   Reply With Quote
Old 08-02-2008, 04:50 PM   #4 (permalink)
New Member
 
Join Date: Aug 2008
Posts: 5
Default

Yeah, that makes lots of sense, i'll give it a go.

Thank you!!!

Dene
deno is offline   Reply With Quote
Old 08-04-2008, 06:28 PM   #5 (permalink)
New Member
 
Join Date: Aug 2008
Location: Omaha, NE
Posts: 12
Default

Quote:
Originally Posted by Havox View Post
Alright for this you'll have to put your entire page in a wrapper div.

The HTML should look something like.

HTML Code:
<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!
__________________
I make Web Sites. Let me make one for you.
Web Design | Hosting | SEO | Smashwebs.com
smashwebs is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT. The time now is 09:57 PM.


Computer Forum - TechZine - Webpage Design

 
Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.