Does Firefox support position: relative on table elements?

后端 未结 9 1253
Happy的楠姐
Happy的楠姐 2020-11-22 12:49

When I try to use position: relative / position: absolute on a or in Firefox it doesn\'t seem to wo

9条回答
  •  无人共我
    2020-11-22 13:30

    I had a table-cell element (which was actually a DIV not a TD)

    I replaced

    display: table-cell;
    position: relative;
    left: .5em
    

    (which worked in Chrome) with

    display: table-cell;
    padding-left: .5em
    

    Of course padding usually is added to width in the box model - but tables always seem to have a mind of their own when it comes to absolute widths - so this will work for some cases.

提交回复
热议问题