Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Cant center vertically
Old 12-01-2009, 11:52 AM Cant center vertically
Average Talker

Posts: 17
Trades: 0
Im trying to center my web site vertically, and tried many ways. Table method didn't work, fixed position I don't want to use because of people with 800x600 screen cant scroll so im stuck

Any ideas on what I do?

My temp upload for the site is at http://jamieknop.com/testfolder/index.html

Thanks,
Jamie
jamiek is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-01-2009, 12:11 PM Re: Cant center vertically
Banned

Posts: 421
Location: Boston, MA
Trades: 1
First of all you need to give html and body tags 100% height. Then also you need to set the css for container class to set it vertically.
webcosmo is offline
Reply With Quote
View Public Profile Visit webcosmo's homepage!
 
Old 12-01-2009, 12:21 PM Re: Cant center vertically
Average Talker

Posts: 17
Trades: 0
Have done this to no avail.

Updated on site http://jamieknop.com/testfolder/index.html and code is below. Any ideas?

Code:
body {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 12px;
    height: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}
#container {
    width: 900px;
    margin: 0 auto;
    position: absolute; 
    top: 50%;
    display: table-cell; 
    vertical-align: middle;
}
jamiek is offline
Reply With Quote
View Public Profile
 
Old 12-02-2009, 04:22 PM Re: Cant center vertically
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Have you read our stickies??

http://www.webmaster-talk.com/css-fo...r-website.html
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 12-04-2009, 03:54 PM Re: Cant center vertically
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
That will NOT work to center VERTICALLY. For margin: 0 auto to work, you MUST also assign a width to the element.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Cant center vertically
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.67742 seconds with 12 queries