开发者

Internet Explorer Javascript Slideshow

I have a very strange issue going on here. It's only occurring on Internet Explorer (what a surprise).

Basically I'm trying to fix a site that was given to me after some third-rate developers finished it and obviously did not test on IE.

They'v开发者_如何学Pythone setup a javascript slideshow, now on the pages with the slideshow active, the whole enclosing "body_section" div is being pushed all the way to the left. Have a look for yourselves:

http://sapaconstruction.com.au/sapa/

That's the homepage which floats everything to the left. Now on this page:

http://sapaconstruction.com.au/sapa/?page_id=4

Everything looks normal, so it must have something to do with the javascript slideshow. Here's what the javascript they've written looks like (it's embed on the page).

<script type="text/javascript" src="<?php bloginfo('template_url') ?>/js/compressed.js"></script>
    <script type="text/javascript">
    $('homeslideshow').style.display='none';
    $('wrapper').style.display='block';
    var homeslideshow=new TINY.slideshow("homeslideshow");
    window.onload=function(){
        homeslideshow.auto=true;
        homeslideshow.speed=5;
        homeslideshow.init("homeslideshow","image","imgprev","imgnext","imglink");
    }
    </script>

Any help with this issue would be amazing, I've wracked my brain for hours trying hacks and margin fixes and things like that.


Well, I can tell you this. This site has way more problems than just that. In looking at the source, there is a div that comes before the html node. I would first of all fix that, as even in firefox, this is causing some strange things to happen. As a matter of fact, I think this "ieonly" div is what is causing the issue, as in IE this div becomes the wrapper in the body. Whoever built this site was not very familiar with cross browser design, and tried to bake in way too many IE hacks.

EDIT:

The problem was IE was in quirks mode due to the lack of a doctype. The following doctype should work:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜