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

Reply
 
LinkBack Thread Tools Display Modes
Old 03-09-2011, 11:33 AM   #1
New Member
 
Join Date: Mar 2011
Posts: 2
Question Layout centered vertically

Hello,

I need to have contents shown in a box that is centered in the page exactly like this: johnpawson.com

I'd like to know if it is possible to have simply a table that starts from a point at the top.

But maybe with CSS there are more effective ways.

Or any kind of solution will do.

Any clue?

Many thanks.
Katranka is offline   Reply With Quote


Old 03-09-2011, 01:51 PM   #2
Platinum Member
 
ronaldroe's Avatar
 
Join Date: Jan 2011
Location: Oklahoma City, OK
Posts: 676
Send a message via Skype™ to ronaldroe
Default

All they're doing is this:

The center div is 530px high.

They set the position:relative and top:50%.

Then, just set the margin to negative half the height. In this case, -265px. So it looks like this: margin-top:-265px;
ronaldroe is offline   Reply With Quote
Old 03-09-2011, 03:44 PM   #3
New Member
 
Join Date: Mar 2011
Posts: 2
Thumbs up great!

That's it!

Thanks!
Katranka is offline   Reply With Quote
Reply

Tags
centered, layout, vertically

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 06:45 PM.


Camera Forum - Computer Forum - Web Design Forum

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
Content Relevant URLs by vBSEO 3.6.0 ©2011, Crawlability, Inc.