I have a javascript that detects the browser and the screen resolution of the visitor. I have tried removing the javascript and just looking at the page within Internet Explorer with a resolution greater than 1024 wide, and I get the same result, so it's not the javascript. The only part that gets messed up is div2 when the screen resolution is greater than 1024. I hardly remember where I started. It it putting in an extra space around the image that it holds.
Here are bits and pieces of the relevant code:
snip .... continue
...snipped for brevity's sake ...
Everything except this magic combination of a good resolution and internet explorer everything works great. I've been pouring over posts in an effort to better understand what I'm doing, but nothing I've tried has worked yet.
Happy2B
Here are bits and pieces of the relevant code:
Code:
if (screen.width > 1024) {
document.write('<style type="text/css">');
if (this.browser == 'Explorer') {
document.write("#div2 {margin: -3px; padding: 0px; position: absolute; top: 20px; left: 125px; z-index:3; }");
document.write("#nav2 {z-index:6; position: absolute;right: 125px;top: 115px; margin:-3px; padding:0; display: inline-block; width: 1px; height: 1px; display: inline-block; zoom: 1; overflow:hidden;}");
} else {
document.write("#nav2 { z-index: 5;position: absolute; right: 135px;top: 115px;}");
document.write("#div2 {margin: 0px;padding: 0px;position: absolute;top: 20px; left: 11%; Z-index: 3;}");
}
document.write("</style>");
} else { // screen width < 1024
document.write('<style type="text/css">');
document.write("#nav2 { z-index: 5;position: absolute;right: 5px;top: 115px;}");
if (this.browser == 'Explorer') {
document.write("#div2 {margin: 0px;padding: 0px;position: absolute;top: 20px;left: 5px; Z-index: 3;}");
} else {
document.write("#div2 {margin: 0px;padding: 0px;position: absolute;top: 20px;left: 5px; Z-index: 3;}");
}
document.write("</style>");
}
snip .... continue
Code:
<div id="div2">
<img src="images/dion.png">
</div>
<div id ="nav2">
<table cellpadding = "0" cellspacing = "0" border="0" >
<tr>
<td class="nav1"><nobr><a href="index.cfm?template=news">News</a></nobr></td>
<td class="nav1"><nobr>Biography</nobr></td>
<td class="nav1"><nobr>Photos & Videos</nobr></td>
<td class="nav1"><nobr>Coaching & Appearances</nobr></td>
<td class="nav1"><nobr>Schedule & Results</nobr></td>
<td class="nav1"><nobr>Links</nobr></td>
<td class="nav1"><nobr>Guestbook</nobr></td>
<td class="nav1"><nobr>Contact</nobr></td>
<td><img src="images/spacer.gif" width="15" height="40"></td>
</tr>
</table>
</div>
<div align="center" id="div1">
<table width="1000" border="0" cellpadding="0" cellspacing="0" style="border-left: 1px; border-right: 1px; border-bottom: 1px; border:#999999; border-style: outset; border-top: none;">
Code:
</table>
</div>
Everything except this magic combination of a good resolution and internet explorer everything works great. I've been pouring over posts in an effort to better understand what I'm doing, but nothing I've tried has worked yet.
Happy2B