PDA

View Full Version : Help with Mikes scroll bar



Jaffa™
04-20-2005, 12:51 PM
Am trying to use Mikes DHTML scroller, which I find to be really great.
http://www.dynamicdrive.com/dynamicindex2/mikescroll.htm

It works fine when viewed in Internet Explorer but craps out for people with Mozilla. My site (http://www.gaystuff.co.nz) (theres no dodgy content)

If anyone can help it would be greatly appreciated.

jscheuer1
04-20-2005, 04:15 PM
The demo works fine in Mozilla. I copied your page and took off the doctype, worked fine. It is this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">at the very top of the page causing the trouble in Mozilla. Generally, this happens if a script references style dimensions or positioning without specifying that the units involved are pixels. It could be other things. So, easiest fix is to drop the doctype statement.

jscheuer1
04-20-2005, 04:23 PM
Oh, and it you have an unrelated typo:
<td width="5" background="right.JPG"></td>></tr>near the bottom of the page.

Jaffa™
04-21-2005, 12:11 AM
Thanks heaps for that, the javascript is now working fine. I am still having a couple of issues tho. If you look at the same site here (http://www.gaystuff.co.nz) in both browsers you'll see that the top part looks fine in IE, but for some reason it requires more space in Mozilla, now not fitting the table dimensions.

The other problem is that now i have removed the DOC tag like you said, the left border is now not showing for some reason in IE, and NEITHER border is showing in Firefox. Any ideas about this?

Jaffa™
04-21-2005, 01:21 AM
I've just added a javascript which detects the browser and shows a website accordingly... thats the best I can do for now i think

jscheuer1
04-21-2005, 07:17 AM
Well, your entire layout is more complex than it needs to be. Those flash images could be rendered as ordinary .gif's or .png's with rollovers. Or, better yet as a blank background button with text on top of them that changes with the hover pseudo class rollover. They would be much easier to position. I can get NS to render the page locally with the flash but IE will not, so far, making it difficult to work on. I'm going to be pressed for time at least until next week so, I am afraid you are on your own, at least as far as I am concerned, until then. What you've done with the browser sniffing seems to be working OK but, it should not be necessary.

markarse
05-10-2006, 11:22 AM
...So, easiest fix is to drop the doctype statement.

Um, OK I can't deny that it is a quick fix, but it's DIRTY...

I had a similar problem with the above script in Firefox, but managed to fix it so it works properly in both FF and IE with the doctype declaration set properly.

I have attached my version of Mike's original dhtmllib in case anyone else is having a similar problem.

HTH

Mark