Firefox ignores absolute positioning in table cells

回眸只為那壹抹淺笑 提交于 2019-11-29 05:27:57

the element is not a block element. add to the style display:block, you will get the needed behavior.

A possible work around would be to wrap the position:absolute element with another position:relative div. It requires an extra div, which is lame, but will give you the right result.

Example: http://jsfiddle.net/pTJUk/

Note -- this still won't give a completely correct result, as the position:relative div will be relative to the text position in the td -- crazy, right? Giving the cell a vertical-align:top will make it orient to 0,0, but of course this could be at the cost of other formatting your design requires.

It was a very old Firefox bug that have been fixed about 13 years after being reported!

You may refer to the entertaining history here: https://bugzilla.mozilla.org/show_bug.cgi?id=63895

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