100% Floating for a layout?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gloomer
    New Member
    • Apr 2007
    • 13

    #1

    100% Floating for a layout?

    I'm just starting CSS, and I'm not sure whether this is a good idea, or whether it would work or not.

    Lets say you have a background, and you want everything to be aligned from the middle downward like a lot of blog sites.

    What if you sliced up the background in to different images and floated those over to the left? The rest you could just float against that. And same on the right?

    Is this just a stupid idea?
  • jamesicus
    New Member
    • Jul 2007
    • 37

    #2
    I think you are trying to produce the classic flexible three box (column) layout.

    Here is the typical CSS coding to achieve that:

    div.leftbox {
    background: #fff;
    color: #000;
    border: 1px solid #000;
    float: left;
    width: 32%;
    }

    div.centerbox {
    background: #fff;
    color: #000;
    border: 1px solid #000;
    float: left;
    width: 35%;
    }

    div.rightbox {
    background: #fff;
    color: #000;
    border: 1px solid #000;
    float: left;
    width: 32%;
    }

    The HTML Document body uses the CSS in this order:

    <div class="leftbox" >

    <div class="centerbo x">

    <div class="rightbox ">

    Here is how it works in practice (validated HTML 4.01 Strict Markup & CSS):

    Pickering Pages

    James

    Comment

    Working...