<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Dynamic DIV</title>
<style>
#header {position: absolute; left: 0px; top: 0px; right: 0px; background: green}
input[type=button] {float:right;}
#top {position: absolute; left: 0px; top: 25px; right: 0px; height: 50%; background: yellow}
#bottom {position: absolute; left: 0px; top: 50%; right: 0px; bottom: 0px;background:aqua; }
</style>
</head>
<body>
<div id="header" >
<label for="checker" >Check</label>
<input type="checkbox" id="checker" >
<label for="slider" >Slider</label>
<input type="range" id="slider" ><span >Some text</span>
<input id="bar" type="button" value="Bar" >
<input id="foo" type="button" value="Foo">
</div>
<div id="top" >Top content</div>
<div id="bottom" >Bottom content</div>
<script>
//see
http://www.pinlady.net/PluginDetect/IE/
var tmp = document.documentMode, e, isIE;
try{document.documentMode = "";}
catch(e){ };
isIE = typeof document.documentMode == "number" ? !0 : eval("/*@cc_on!@*/!1");
try{document.documentMode = tmp;}
catch(e){ };
if (isIE)
{
document.getElementById('header').style.marginTop='-10px';
document.getElementById('header').style.height='40px';
document.getElementById('bar').style.marginTop='11px';
document.getElementById('foo').style.marginTop='11px';
}
</script>
</body>
</html>
Bookmarks