How can I dock a div in IE 8?
you amazingly kind and intelligent people. Consider the following HTML:
<html>
<body>
<div id="Panel1" 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" tabindex="3"/>
</div>
</body>
</html>
What I'm doing here is docking the div to the right hand side of the screen so that it extends from the top to the bottom. This works perfectly in Google Chrome, but not in IE8.
开发者_StackOverflow中文版I've uploaded the page here http://losthobbit.net/temp/testdoc.html in order to make your life just a little bit easier.
Any idea as to how I can get this working in IE?
Thanks!
Well, just add a valid doctype and your done ;)
Ex.:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
I must be losing it in my old age...
All I have to do is set the height to 100%.
精彩评论