Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

calc not working ie 11

After researching I confirmed that calc should work for ie8+ but it is not working for me.

Here is a JS fiddle I made:

http://jsfiddle.net/75tzyLoo/

here is the code: HTML:

<div id="outer">
    <div id="inner">

    </div>
</div>

CSS:

#outer{
    width:400px;
    background-color:black;
    height:200px;
}
#inner{
    width:calc(80%-100px);
    width:expression(80%-100px);
    background-color:red;
    height:100%;

}

and here is the output I see: JS Fiddle output for calc not working

What am I doing wrong?

like image 419
Ahmed-Anas Avatar asked Aug 11 '14 11:08

Ahmed-Anas


1 Answers

"-" should be surrounded with spaces width:calc(80% - 100px);

Demo

like image 110
JunM Avatar answered Sep 19 '22 21:09

JunM