Problem in aligning Div's using CSS

Discussion in 'CSS' started by sandeepbhutani304, Oct 29, 2008.

  1. #1
    Hi All,

    I need a layout using CSS.
    I am having 3 divs - div1, div2 and div3

    I want them positioned like

    Div1 Div3
    Div2
    I am not able to do it without using a absolute positioning which I do not need. Can anybody please provide some suggestions what flot/position etc CSS should I apply

    Thanks in advance
     
    sandeepbhutani304, Oct 29, 2008 IP
  2. buzzmaker

    buzzmaker Peon

    Messages:
    103
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This would basically be a 2 column layout, where the 1st column would have the DIV1 and below that DIV2.
    The DIV3 would be in the second column.

    To achieve this, you need to first create 2 columns. Lets call them DIV.left and DIV.right.

    div.left { float: left }
    div.right { float: left }

    Then, in the DIV.left put code for DIV1 and DIV2.
    In the DIV.right put code for DIV.3

    I hope this is a static page.
    This would be the simplest way to do it.
     
    buzzmaker, Nov 6, 2008 IP
  3. mypsdtohtml

    mypsdtohtml Guest

    Messages:
    96
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Using float:left; you can achieve this in your xhtml / css
     
    mypsdtohtml, Nov 6, 2008 IP