开发者

Floating spans in captions

Hi guys this is my piece of code ..

...
<caption>
<span class="drawicon">&nbsp;</span>
I am the Caption Text
<span style="float:ri开发者_如何学Goght;">Extra</span>
</caption>
...

I'm currently don't understand why the span that floats will appear below the caption in firefox but not in other browsers.

 ______________________________________________________________
| [icon] I am the Caption Text                                 |
|______________________________________________________________|
                                                 |_____________|<- span that floats


Can you post the relevant CSS information as well?

The different browsers interpret the CSS Box Model differently, resulting in different decisions around how to display things. I believe Firefox interprets margins differently, but I don't know if that is affecting anything here as you haven't shown the relevant CSS.

I prefer using div's to set width and height and would switch to those here instead of spans. But review the CSS Box Model and how FF interprets it vs. other browsers.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜