3 col CSS layout adding middle bgcolor?

Discussion in 'HTML' started by Bo, Jul 25, 2009.

  1. Bo

    Bo Guest

    How can I add some code so that left1, left2 and right in the code below has
    a white background of their own and I can black or image defined in the body
    tag?

    Thx in advance.

    <style type='text/css'>
    ..wrapper{
    margin: 0px auto;
    width: 986px;
    background-color: #cccccc
    }
    ..header{
    float: left;
    width: 986px;
    height: 114px;
    background-color: #6699cc;
    position:fixed
    }
    ..left1{
    float: left;
    margin-right: 20px;
    margin-top: 120px;
    width: 180px;
    background-color: #ffffff
    }
    ..left2{
    float: left;
    margin-right: 20px;
    margin-top: 120px;
    width: 606px;
    background-color: #ffffff
    }
    ..right{
    float: right;
    margin-top: 120px;
    width: 160px;
    background-color: #ffffff
    }
    ..footer{
    float: left;
    width: 100%;
    background-color: #cfcfcf
    }
    body {
    padding: 0px;
    margin: 0px;
    background-color: #000000
    }
    </style>

    Bob
    Bo, Jul 25, 2009
    #1
    1. Advertising

  2. Bo

    dorayme Guest

    In article <4a6acab1$0$48243$>,
    "Bo" <> wrote:

    > How can I add some code so that left1, left2 and right in the code below has
    > a white background of their own and I can black or image defined in the body
    > tag?


    What a funny sentence? Perhaps you are wanting .wrapper (overflow:
    hidden;} or, to satisfy IE6, put a cleared element below the floats.

    Perhaps you might be helped by:

    http://netweaver.com.au/floatHouse/

    --
    dorayme
    dorayme, Jul 25, 2009
    #2
    1. Advertising

  3. Bo

    richard Guest

    On Sat, 25 Jul 2009 11:04:09 +0200, "Bo" <> wrote:

    >How can I add some code so that left1, left2 and right in the code below has
    >a white background of their own and I can black or image defined in the body
    >tag?
    >
    >Thx in advance.
    >


    body {background:#fff}

    ..left1, .left2, .right {background:#000}
    richard, Jul 25, 2009
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Eric
    Replies:
    4
    Views:
    699
    clintonG
    Dec 24, 2004
  2. Replies:
    1
    Views:
    564
    John Timney \(MVP\)
    Jun 19, 2006
  3. gmax2006
    Replies:
    1
    Views:
    436
    Andy Dingley
    Jul 18, 2006
  4. Replies:
    11
    Views:
    808
    richard
    Sep 29, 2006
  5. Replies:
    8
    Views:
    200
    Eric Sosman
    Apr 20, 2013
Loading...

Share This Page