Why does Firefox 4 absolutely position fieldset legends differently than other browsers?

好久不见. 提交于 2019-12-05 23:34:14

legend elements are quirky and weird. That being said, if all the other browsers do the same thing, then Firefox should do the same thing.

There's already a bug report here describing the issue in detail: https://bugzilla.mozilla.org/show_bug.cgi?id=450418

A workaround is to add a wrapper div inside the fieldset and move the padding to that.

Your unchanged code: http://jsbin.com/ivedo4

Fixed code: http://jsbin.com/ivedo4/2

I tested it with the same browsers (not identical versions, but close) you listed in your question, and the rendering was consistent.

My code doesn't look quite right in IE8, but yours is broken in exactly the same way.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!