HTML Table - max-width not working on td descendants

后端 未结 2 1446
别那么骄傲
别那么骄傲 2021-01-01 12:26

I have table with width: 100% and an element in that table with width: 40em; max-width: 100%, but the element is still stretching the table when th

2条回答
  •  攒了一身酷
    2021-01-01 12:39

    if you put it on the element, the element gets stretched to max-width: 100%.

    If you want fixed width, use width: 40px (instead of %, percentages are used in liquid layouts)

提交回复
热议问题