开发者

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

开发者 https://www.devze.com 2023-03-09 19:56 出处:网络
Consider this page: http:/开发者_如何学C/losthobbit.net/temp/docking.html Here\'s the HTML: <html>

Consider this page: http:/开发者_如何学C/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 :)


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


http://jsfiddle.net/X2QYs/

Try this, does what you have asked.

Not sure why you would ever want to do that though, is not like any webpage design I have seen before.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号