Search code examples
htmlgoogle-chromestylesheetcss

Design a table with exact width for Chrome


My table is working well if I define the max width in with CSS, but chrome ignore them and doesn't show as expected.

the same problem notice before Chrome, Safari ignoring max-width in table

Is there any way to define the max-width for table inside chrome.


Solution

  • As the answer in the other question you linked pointed out, tables are neither block nor inline and max-width only applies to block or replaced elements. So it seems Chrome is working as the html spec says--as unhelpful as that is.

    Not sure if it'll help, but max-width does work for td's. Perhaps you can come up with an alternative design that uses that fact.