How to put a Div next to a Div

Discussion in 'CSS' started by cj1223, Sep 2, 2006.

  1. #1
    I cant figure how to style a div id to make a boxed div id appear next to another boxed div id, any know how?
     
    cj1223, Sep 2, 2006 IP
  2. fsmedia

    fsmedia Prominent Member

    Messages:
    5,163
    Likes Received:
    262
    Best Answers:
    0
    Trophy Points:
    390
    #2
    Yes, use a wrapper.

    <div id="main">
    <div id="left" style="float:left;"></div>
    <div id="right"></div>
    </div>
    Code (markup):
     
    fsmedia, Sep 2, 2006 IP
  3. cj1223

    cj1223 Well-Known Member

    Messages:
    287
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #3
    how do i place that properly if i already got a div id"cl" wouldnt i change somthing in the id code? if not explian how to use that wrapper
     
    cj1223, Sep 2, 2006 IP
  4. fsmedia

    fsmedia Prominent Member

    Messages:
    5,163
    Likes Received:
    262
    Best Answers:
    0
    Trophy Points:
    390
    #4
    do some reading on www.alistapart.com -- they have some awesome tutorials to help you with exactly these kinds of things.
     
    fsmedia, Sep 2, 2006 IP
  5. cj1223

    cj1223 Well-Known Member

    Messages:
    287
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    108
    #5
    I see a float option in styleing a div id, but it only alows center, right, and left, bit i need right top, it appears as right below the other box,and i need it next to that box
     
    cj1223, Sep 2, 2006 IP