CSS Positioning Absolute within table cells not working in Firefox

后端 未结 7 1169
礼貌的吻别
礼貌的吻别 2021-01-17 15:48

I cannot figure out this positioning problem in Firefox. It doesn\'t seem to follow the absolute positioning rule. Is there something I\'m doing that shouldn\'t be done, but

7条回答
  •  攒了一身酷
    2021-01-17 16:18

    Aside from the duplicate ID issue noted by Brandt, assigning positioning to table cells is dodgy at best - I'm surprised it works in any browsers. If you must use a table, wrap the elements you want to position in a div and assign the wrapper div position: relative:

    Three
    Two

    CSS

    #two {
       position: absolute;
       top: 0;
    }
    .wrapper {
       position: relative;
    }
    

提交回复
热议问题