Search code examples
cssalignment

CSS align 2 block bottom


I have 2 block, red block width: fixed height: auto, green block width and height fixed, I don't know how to align green block that it will be on bottom, now it's on top; Can see example: http://jsfiddle.net/MXqTY/3/


Solution

  • Add this:

    .square1, .square2 {
        display: inline-block;
        vertical-align: bottom;
    }
    

    and remove float: left.

    http://jsfiddle.net/thirtydot/MXqTY/8/