Forum Moderators: open

Message Too Old, No Replies

Safari bug: 130x320px gap with <div><a><object></object></a></div>

         

eSite

9:18 am on Aug 28, 2006 (gmt 0)



Hi,

If you place the below code in a blank HTML page and view it with Safari 2.0.4, you'll see a 130 pixel vertical gap between 1 and 2, and a 320 pixel horizontal gap between 3 and 5.

1
<div>
2
<a>
3
<object>
4
</object>
5
</a>
6
</div>
7

It seems that it's a bug due to the HTML renderer of Safari, but I guess that CSS could fix it so maybe this thread should be in the CSS forum.

Notice : the code is this simple because I removed all what is not related to the bug, also I do need those tags and I do need them to be enclosed like this.

I would like a CSS or HTML fix to this bug, but please test your own before suggesting it to me, thanks.

encyclo

1:33 am on Aug 29, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There is nothing intrinsically wrong with your markup, but unfortunately I don't have Safari to check. In KDE Konqueror 3.5.2 (which uses the same rendering engine with some differences) I can't reproduce the problem.

Are you declaring any styles on the

div
or on the
object
element?

eSite

8:28 am on Aug 29, 2006 (gmt 0)



> Are you declaring any styles on the div or on the object element?
No, the above code is the only thing present in the page.

I reproduced the bug in WebKit 16089 and Shiira 1.2.2 but not in Flock 0.7.4.1

eSite

3:51 pm on Aug 29, 2006 (gmt 0)



It can be patched with CSS by specifying height and width for the object
tag.

eSite

6:11 pm on Aug 29, 2006 (gmt 0)



Now you might be able to help.
What could I replace <object> with so that I get rid of the bug but keep the whole thing valid?

[code]
<a>
<script type='text/javascript'>
</script>
<object>
<noscript><p><img src="" alt="" /></p></noscript>
</object>
</a>
[code]