Results 1 to 6 of 6

Thread: Table-less format

  1. #1
    Join Date
    Aug 2007
    Location
    Kansas, USA
    Posts
    36
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default Table-less format

    I am trying to create a standard looking web page (top area, left column, middle area, right column) without using tables, but I'm having trouble.

    http://www.digibard.org/css_test.html

    According to my book, width and height in CSS should be relative to the parent container. But they aren't, they are relative to the browser area.

    Also, I can't get the text in the middle area to wrap without setting a width, but I can't get width to be a percentage relative to the container.

    Can I get some help?

    ps. I am using Firefox 3.01 to view the page.
    Last edited by DigitalBard; 09-04-2008 at 11:09 PM. Reason: add browser info

  2. #2
    Join Date
    Aug 2007
    Location
    Kansas, USA
    Posts
    36
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Btw, if I change it to use fixed sizes for everything, it works fine, but I want the flexibility of variable width.

  3. #3
    Join Date
    Jul 2006
    Location
    just north of Boston, MA
    Posts
    1,806
    Thanks
    13
    Thanked 72 Times in 72 Posts

    Default

    when creating a 3column css layout, you need to have the main "center" section declared first in the html. Then apply the left float to the section that will be on the left and a right float that will be on the right. The last thing is to create a width for each side column, then create left and right margins on the main content and voila you shall have a standards compliant, best practices, seo 3 column website.

    Code:
    <div id="container">
         <div id="top_area">
              top
         </div>
         <div id="middle_area">
              middle middle middle middle middle middle middle middle middle middle middle middle middle middle middle middle middle middle middle middle
         </div>
         <div id="left_column">
              left
         </div>
         <div id="right_column">
              right
         </div>
         <div id="bottom_area">
              footer stuff
         </div>
    </div>
    Visit http://matthewjamestaylor.com/blog/perfect-3-column.htm for a great article about 3column css layouts

  4. #4
    Join Date
    Aug 2007
    Location
    Kansas, USA
    Posts
    36
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    Thanks, I'll take a look at that site. It's still not working.

  5. #5
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    What you are looking for is called the "Holy Grail" 3 -Column layout. Using Divs, nested properly, you can achieve this with relative ease. here is a link That will cover the hows and whys of this and several other layout types, without using tables.

    Good Luck!
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  6. #6
    Join Date
    Jul 2007
    Location
    New Zealand
    Posts
    81
    Thanks
    1
    Thanked 1 Time in 1 Post

    Default

    Hi there,

    I found this site quite helpful - it has various 3 column layouts (header - left, content, right - footer).

    http://pmob.co.uk/temp/3colfixedtest_explained.htm

    Heaps of working examples.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •