PLEASE do NOT strip my credits out of your code. They are harmless. Unlike most sites, My credits do NOT show up on your visible page, there is no reason to remove them. If you make a derivative of my work, you may add your own credits, but leave mine in tact.

I apologize for being less attentive to people's questions than in the past. I hope to return to doing this at some time. But for now I need to think about what I want to do. This doesn't mean I am completely ignoring all questions, if I suspect there might be a bug in my code, or myspace has made some change effecting it, I will still dig in and research.

Saturday, September 01, 2007

FireFox Marquee Direction Down Div Bug

Interesting FireFox Marquee Bug (or is a Feature?)

[If you are just looking for sample code, to create a marquee, I have a sample. However it is designed to demonstrate a bug. If you want it to work correctly, you might want to remove the style block at the bottom of the code block.]

While I was trouble shooting someone's mySpace profile, I came across some interesting behavior, related to FireFox and the marquee tag.
I tested the behavior outside of mySpace, so this problem is not caused by anything in the myspace code.

For some reason, when used with direction=down (or direction=up); the marquee thinks it is inside an additional div.

On the page I was troubleshooting, the marquee was in a div. It was several tables and one div deep.
The code had a style block, which had the following line:
table div div {display:none;}

Initially I thought maybe I had missed a div layer, but if that had been the case, then why did it work with direction:left.

I ended up doing several tests.

It worked fine if I used direction=left or direction=right.
It failed to show the marquee if I used direction=down or direction=up.
If I removed the style command
table div div {display:none} it worked with direction=down.

Here is some very basic marquee code. (It is a complete html block, feel free to cut and paste it into an html editor and run it.)

First, run it as it is, it should work, the marquee should move left.
Next, change left to down. It will no longer work (in FF, it is fine in IE)
Then remove the line:
div div {display:none}
It should work.
Note that the marquee is only ONE div deep.

<html>
<div class="friends" style="height:450px; width:100px">
<h1>friends</h1>
<marquee direction=left height=380 width=100 >
<img
src="http://i178.photobucket.com/albums/w275/madeline_fogg/80tom.jpg" />
<br>
<img
src="http://i178.photobucket.com/albums/w275/madeline_fogg/80-dick.jpg" />
<br>
<img
src="http://i178.photobucket.com/albums/w275/madeline_fogg/80-harry.jpg" /></a>
<br>

</marquee>
</div>

<style>
div div {display:none;}
</style>
</html>

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home