CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Try It Free
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old November 20th, 2003, 10:19 AM
SexyDevil82 SexyDevil82 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 15 SexyDevil82 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 sec
Reputation Power: 0
Question Positioning with CSS

I have a table not long enough to fill the page. I want the table to always be in the middle of the page at no matter what resolution. I know that for text I could just have <td valign="middle"> but how can I do the same but for a table using CSS? Is there a variable where I can check the size of the screen and align it that way?

Thanks

Reply With Quote
  #2  
Old November 20th, 2003, 01:16 PM
sciguyryan sciguyryan is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Rhondda Cynon Taff, Wales
Posts: 172 sciguyryan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 18 m 24 sec
Reputation Power: 5
try either the position:relative or postion:absolute positioners.
__________________
Ryan Jones (RyanJ)

Reply With Quote
  #3  
Old November 20th, 2003, 04:19 PM
kk5st's Avatar
kk5st kk5st is offline
Thanks Johnny Hart (BC) R.I.P.
Dev Shed Demi-God (4500 - 4999 posts)
 
Join Date: May 2003
Location: Dallas
Posts: 4,541 kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level)kk5st User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 1 Month 2 Days 1 h 27 m 15 sec
Reputation Power: 597
Look here for an example of centering a <div> horizontally and vertically in the window. Use the div as a container for your page. This little exercise is not pure CSS, it uses a single cell table as the outer container. I generally don't use tables for layout, but if you want vertical centering, this seems to be the only elegant hack.

cheers,

gary
__________________
There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

Ask a better question, get a better answer.

Reply With Quote
  #4  
Old November 21st, 2003, 07:26 AM
SexyDevil82 SexyDevil82 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Posts: 15 SexyDevil82 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 sec
Reputation Power: 0
Thanks in a million! I surely appreciated you sharing your knowledge.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Positioning with CSS


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway