Hi Guys,
I'm running into some problems creating a clip area in css for Internet Explorer.
The markup and styling works perfectly in Mozilla Firefox but doesnt in IE.
If you remove the doctype to have the page render in quirks mode, the clipping area gets rendered correctly in both IE and firefox.
Anyone know how I can get IE to properly clip the content div in XHTML 1.0 Strict?
I know that if I used a table rather than a div for the clipping rectangle that it'll work in both browsers but I would like to avoid doing so.
Thanks!
--KK
I'm running into some problems creating a clip area in css for Internet Explorer.
The markup and styling works perfectly in Mozilla Firefox but doesnt in IE.
HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<style type="text/css">
.clip {
width:400px;
height:200px;
background-color:#000;
overflow:hidden;
border:1px solid red;
margin-top:100px;
}
.content {
background-color:#000080;
color:#FFF;
position:relative;
top:-50px;
}
</style>
</head>
<body style="background-color:#222222;">
<div class="clip">
<div class="content">
HardForum HardForum HardForum HardForum HardForum HardForum HardForum HardForum HardForum HardForum HardForum HardForum HardForum HardForum HardForum HardForum HardForum HardForum
</div>
</div>
</body>
</html>
If you remove the doctype to have the page render in quirks mode, the clipping area gets rendered correctly in both IE and firefox.
Anyone know how I can get IE to properly clip the content div in XHTML 1.0 Strict?
I know that if I used a table rather than a div for the clipping rectangle that it'll work in both browsers but I would like to avoid doing so.
Thanks!
--KK