[thelist] (solution, kinda) styling iframe
Erik Mattheis
gozz at gozz.com
Tue Mar 11 18:23:08 CST 2003
The horizontal scrollbar on the iframe was only showing up when IE6 was
in "standards-compliant" mode ... a solution to getting rid of the
horizontal scrollbar was to say <html style="overflow-x: hidden"> ...
as overflow-x is an IE proprietary style, I'm happier with:
<script language="javascript" type="text/javascript">
<!--
if (document.getElementsByTagName) {
ht = document.getElementsByTagName('html');
if (typeof ht[0].style.overflowX == 'string') {
ht[0].style.overflowX = 'hidden';
}
}
//-->
</script>
... uh, but still want to figure out why it was showing up .... all
applicable code for anyone who wishes to point out the error in my
ways, or rather hopefully how to work around the errors in IE's ways
without using overflow-x:
Styles for both docs:
#news { padding: 0px;
border-left: 1px;
border-top: 1px solid #730;
border-right: 0px;
border-bottom: 1px solid #fae6d7;}
iframe { width: 100%;
height: 12em;
border: 0px;
padding: 0px;}
td { vertical-align: top;
padding: 3px;}
<td colspan="2" id="news"><iframe src="news_lines.html"
frameborder="0"></iframe></td>
and in iframe:
<body style="margin:0px; padding: 0px;">
<table style="width:100%;border-collapse:collapse; margin:0px; padding:
0px;">
... and again, the table "width" was rnding on the right side of the
vertical scrollbar, causing an unwanted horizontal one.
-----------------------
Erik Mattheis
GoZz Digital
<http://goZz.com/>
Flash and ColdFusion Development
Minneapolis, MN
-----------------------
More information about the thelist
mailing list