Scripts
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb Site ManagementScripts

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 May 12th, 2004, 11:33 AM
sense sense is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 61 sense User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Website Centering

I need to center my whole website so it is centered on any res.... i have tryed but have failed!! Everything is in tables, so if that is a help...

www.senseof16.tk

Reply With Quote
  #2  
Old May 15th, 2004, 02:41 PM
EAD's Avatar
EAD EAD is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: an hour away from L.A., California
Posts: 132 EAD User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 18 h 11 m 40 sec
Reputation Power: 6
It looks centered to me. Have you tried using <div align="center"></div> just inside your body tags?

Reply With Quote
  #3  
Old June 1st, 2004, 01:08 PM
ryno267 ryno267 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 6 ryno267 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to ryno267
CSS is your answer

I'm assuming your content has a certain fixed width ? at least and possibly fixed height as well?

basically you can easily do this in css with one div layer.
lets say your fixed width is 600 px wide... and your height was 400px...

Code:
#midfloat { position: absolute;
top:50%; left:50%;
margin-top:-200px;
margin-left:-300px;
border:0px;
}


Now just put the <div id="midfloat"> your content </div>

What thats doing is telling the top left corner of that div tag and the stuff in it to start at 50% from top and left (or the center). Then your subtracting half your height and half your width to move that top left corner or your div so that now the center of that fixed width 'box' is at dead center. Then resize away - works great.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb Site ManagementScripts > Website Centering


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 2 hosted by Hostway