hey all,

I hope you can help.

I have a page which has a little javascript which rotates banner images. 
When I first added this js, the banner images slipped down 9px, showing 
a white gap on the top. After much trial and error, I added some css to 
the js in the header, and it looks hunky dory in everything but IE, 
which backs it up so that it covers 9px worth of the navigation and 
shows some weird junk at the bottom.

http://www.uoguelph.ca/mcb/test/image-on-IE.png

Is there someplace I can style the js so I can write an IE hack for it? 
Putting the css right in the js was all I could do that would work, but 
it doesn't work all that well, and I have a feeling that there must be a 
better way.

Thanks in advance for your help,
Sandy


<script type="text/javascript" language="JavaScript">
<!-- thank you to Bontrager Connection. Copyright 2002 Bontrager 
Connection, LLC
//
// Type the number of images you are rotating.

NumberOfImagesToRotate = 5;

// Specify the first and last part of the image tag.

FirstPart = '<img src="images_banner/index';
LastPart = '.jpg" height="220" width="860" style="margin-top : -9px" >';

function printImage() {
var r = Math.ceil(Math.random() * NumberOfImagesToRotate);
document.write(FirstPart + r + LastPart);
}
//-->
</script>



http://www.uoguelph.ca/mcb/test/
http://www.uoguelph.ca/mcb/test/css/mcb2009.css
http://www.uoguelph.ca/mcb/test/css/ie6-hacks.css
http://www.uoguelph.ca/mcb/test/css/ie7-hacks.css


______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to