3 columns

Discussion in 'CSS' started by mytvtalk, Nov 27, 2008.

  1. #1
    hi every one whats the best way to have 3 colums in a layout?

    i dont want the whole site to be 3 columns i just want to put 3 columns in the content section so i would have something like:

    <div id="content">

    <div id="leftcolumn>

    <p>bla bla bla here</p>

    </div>

    <div id="center column">

    <p>......</p>


    </div>

    <div id="right column">

    <p>.....</p>

    </div>

    thanks for any advice you can give.
     
    mytvtalk, Nov 27, 2008 IP
  2. 007c

    007c Peon

    Messages:
    611
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Just float em left and specify a width to em.
     
    007c, Nov 27, 2008 IP
  3. irwanmis

    irwanmis Active Member

    Messages:
    132
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    55
    #3
    Using float: left; is the best advice, just make sure you calculate the width of the divs so they won't exceed the container (content div).
    You should also check how the result on different web browsers.
     
    irwanmis, Nov 27, 2008 IP
  4. mytvtalk

    mytvtalk Active Member

    Messages:
    933
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    60
    #4
    ok thanks guys this worked :D
     
    mytvtalk, Nov 27, 2008 IP