Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS alternative for display:box for IE and Opera?

I am using display:box for a flexible width div with three boxes of equal size and with equal spacing. This works fine for Firefox, Safari and Chrome, but not in IE and Opera. I am wondering what the best alternative method for IE and Opera would be. Here is the display:box CSS:

.box {
    display: -moz-box;
    display: -webkit-box;
    display: box;
    width: 100%;
}

.box1, .box2, .box3 {
    -moz-box-flex: 1;
    -webkit-box-flex: 1;
    box-flex: 1;
    width: 0;
}

.box2, .box3 {  
    margin-left: 20px;
}

And the HTML:

<div class="box">
<div class="box1"></div>
<div class="box2"></div>
<div class="box3"></div>
</div>

You can see it in action here.

I'd be glad to hear of an alternative method for achieving a similar result in IE and Opera.

Thanks,

Nick

like image 236
Nick Avatar asked Jul 29 '11 13:07

Nick


1 Answers

Flexie implements support for this in browsers that do not natively support display: box;.

like image 109
Delan Azabani Avatar answered Sep 28 '22 03:09

Delan Azabani