Firefox issue with display:absolute in a table cell

后端 未结 2 910
广开言路
广开言路 2020-12-10 05:53

I have found an issue when using absolutely positioned content within a td element. The td element is not being recognised as a positioned element

2条回答
  •  眼角桃花
    2020-12-10 06:13

    Did you try to set the position of the TD explicitly to relative?

    This should reset the positioning. Actually, it is correct behavior what you are getting, and should not be only related to TD, but you know, browsers are fun.

    For details on why you need to explicitly set it, check:
    http://css-tricks.com/791-absolute-positioning-inside-relative-positioning/

    ..

    Update:

    This answer suggested trying an option. It's written earlier than accepted answer, and is not deleted just for archival reasons and as it is another related possibility for those coming here from search engines for slightly similar but not same problem. I appreciate your understanding.

提交回复
热议问题