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
Old 01-12-2009, 10:28 AM Table Layout
Skilled Talker

Posts: 90
Trades: 0
Hunter's Friend - This site was done using a table and percentages for width for the layout. Notice how it doesn't matter what screen size you have, the site always takes up the whole screen. I like that.

Tackle Warehouse - As opposed to this site. The enormous white space on the right really makes the page feel unnecessarily cramped.

Does anyone know how to duplicate the layout of the first page, using CSS rather than tables?
Shadrach is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-12-2009, 10:58 AM Re: Table Layout
SolidEagle's Avatar
Experienced Talker

Posts: 30
Name: Arjan Nijmeijer
Location: Stadskanaal
Trades: 0
You could implement a wrapper div in the second site and put every code you want centered in it. In the css you have to give this wrapper a fixed width and a margin (see my example below). For IE6 you'll need another method which is the text-align:center;
Code:
<html>
    <head>
            <style>
                body{
                    text-align:center; //fix for IE6
                }
               #wrapper{
                    text-align:left; //because the IE6 fix everything is center, 
                                         //to fix this put allign left here.
                    width:900px;    // just an example width!!!
                    margin:0 auto 0 auto;  // the two auto's will center your page 
                                                   //in most browsers
               }
            </style>
    </head>
    <body>
        <div id="wrapper">
            //your site code here
        </div>
    </body>
</html>


I Hope this will help you
SolidEagle is offline
Reply With Quote
View Public Profile
 
Old 01-12-2009, 11:07 AM Re: Table Layout
Skilled Talker

Posts: 90
Trades: 0
Neither of those sites are mine. I was just using them as examples of what I liked and didn't like.

Also, I noticed in the sticky posted about this topic that the height attribute can be set to a percentage. Does that go for width as well?

Last edited by Shadrach; 01-12-2009 at 11:08 AM..
Shadrach is offline
Reply With Quote
View Public Profile
 
Old 01-12-2009, 11:24 AM Re: Table Layout
SolidEagle's Avatar
Experienced Talker

Posts: 30
Name: Arjan Nijmeijer
Location: Stadskanaal
Trades: 0
yup that's possible.
SolidEagle is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Table Layout
 

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.13723 seconds with 12 queries