Search code examples
htmlinternet-explorerinternet-explorer-8docking

Can I dock a div against another div in IE 8?


Consider this page: http://losthobbit.net/temp/docking.html

Here's the HTML:

<html>
<head>
    <title></title>
</head>
<body>
    <div style="position: absolute; bottom: 0; right: 0; top: 0; width: 259; background-color: #00FF00">
        <input type="button" style="position: absolute; left: 161; top: 30; width: 75; height: 25"/>  
    </div>    
    <div style="position: absolute; bottom: 0; right: 259; left: 0; height: 100; background-color: #00FFFF">
        <input type="button" style="position: absolute; right: 10; top: 30; width: 75; height: 25"/>  
    </div>
</body>
</html>

In Chrome & FireFox this works perfectly. The second div docks against the first div.

Is it possible to get this working in IE8?

Thank you in advance, wonderful people :)


Solution

  • Add units for example "px" to your css values. IE likes it more that way, not so forgiving as FF or Ch :)