2 Divs in 1 line

Discussion in 'CSS' started by Mrans, Sep 11, 2007.

  1. #1
    hey guys
    how can i set 2 divs in a line?
    i couldnt set them in a line. 2nd div was shifted to next line:(

    thank you
     
    Mrans, Sep 11, 2007 IP
  2. crazyryan

    crazyryan Well-Known Member

    Messages:
    3,087
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    175
    #2
    You could use span instead of div.
     
    crazyryan, Sep 11, 2007 IP
  3. KipperMyHero

    KipperMyHero Peon

    Messages:
    9
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    float divs. you can float both to left or right, or one to left, one to right, but needs to give width to the divs.
     
    KipperMyHero, Sep 11, 2007 IP
  4. Philopoemen

    Philopoemen Peon

    Messages:
    704
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Divs can be horizontally aligned only if floated.
     
    Philopoemen, Sep 11, 2007 IP