flex box #3

by danield770

HTML

<div class="box">
  <div class="item1">A</div>
  <div>B</div>
  <div class="item3">C</div>
</div>

CSS

*
{
    margin:0;padding:0;
}
html,body
{
    height: 100%;
}
.box {

    height: 100%;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-flexbox;
    display: -webkit-flex;
    display: flex;
    -webkit-box-direction: normal;
    -moz-box-direction: normal;
    -webkit-box-orient: horizontal;
    -moz-box-orient: horizontal;
    -webkit-flex-direction: row;
    -ms-flex-direction: row;
    flex-direction: row;
    -webkit-flex-wrap: wrap;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -webkit-box-pack: center;
    -moz-box-pack: center;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -moz-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    }
.box div
{
    width: 100px;
    height:100px;
    background: brown;
    margin: 0 10px;
}

div.item1
{
    height: 50px;
    background: pink;
}
div.item3
{
    height: 200px;
    background: orange;
}

/*
    Legacy Firefox implementation treats all flex containers
    as inline-block elements.
*/

@-moz-document url-prefix() {
.box {
    width: 100%;
    -moz-box-sizing: border-box;
    }

}