Firefox adds a vertical whitespace gap
I was having this problem a while ago where I want to add a flash <object> inside a table td, in IE and Chrome it displays just fine but Firefox insists on putting a very small (about 3px) amount of whitespace after it. I already add css margin zero, padding zero, etc unto it but still no good. I was thinking that it's a bug in Firefox but shame on me, after wandering on the web, going to some forums, googling, chatting for some advice, I found out that the only thing I have missed is to put the css "display:block" on my <object> tag.They said that it's because image(<img>) or object(<object>) is being considered inline-level, as where like text it rests on a baseline. You need to make them block-level:
<td><object style='display:block;'>...</td>
or
<td><img style='display:block;'>...</td>
Their explanation wasn't really clear for me but as long as it works then I'm already fine with that.
Hehe, noob jud..



0 comments:
Post a Comment