How to make a div align to the right side of the parent while maintaining its vertical position?

.div1{
    margin:0 auto;
    width:100px;
    height:50px;
    border:5px solid #995555;
}
.div2{
    width:100px;
    margin:0 auto;
    border:5px solid #aaaa55;
    height:200px;
}
.div3{
    float:right;
    width:50px;
    height:100px;
    border:5px solid cyan;
}
<div class="div1">div1</div>
<div class="div3">div3</div>
<div class="div2">div2</div>

Demo also at http://jsfiddle.net/XjC9z/1/

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)