0

I have a working example of a layout that I cant get to work in IE. When I click on the buttom I toggle the size between 50px and 100px on the bottom div.

I tried to make a fiddle but couldnt get it to work.

<style type="text/css">
    .table
    {
        display: table;
        width: 100%;
        height: 100%;
    }

    .bottom
    {
        display: table-row;
        height: 100px;
        background-color: red;
    }

    .top
    {
        display: table-row;
        height: 100%;
        background-color: yellow;
        position: relative;
    }

    .header
    {
         height: 100px;
         background-color : gray;
    }

    .content
    {
        display: table-row;
        height: 100%;
        background-color: yellow;
        position: relative;
    }

    .footer
    {
        display: table-row;
        height: 100px;
        background-color: blue;
    }

</style>
<div style="position: absolute; top: 0; right: 0; bottom: 0; left: 0;">
<div class="table">
    <div class="top">
        <div class="table">
            <div class="header" >
                header
            </div>
             <div class="content">
                1.1
            </div>
            <div class="footer">
                1.2
            </div>
        </div>
    </div>
    <div class="bottom">
    <!-- Can change bottom height to 50px on click -->
        <button id="changeSize"></button>
    </div>
</div>
</div>
user1199595
  • 406
  • 2
  • 7
  • 16

1 Answers1

0

I have got the code above working in a jsfiddle: http://jsfiddle.net/c8nLb/1/

As far as I know, it works in IE(9).

I noticed the element with the class bottom and changed it to an ID ( getElementsByClassName IE resolution issue)

I also moved the height from the main CSS styling rules block to an inline style because I had trouble getting it to take the height style with the Javascript.

Hopefully it works for you too!

Community
  • 1
  • 1
starbeamrainbowlabs
  • 5,692
  • 8
  • 42
  • 73