After the width of the table on the page is set to width=600px, the width is still not fixed. If the text is too long, the line will not be changed, which will deform the table.
Solution:
1.Table sets the width, absolute width and relative
table-layout:fixed ;
This property is set, and all other tds are of the same width.
After this operation, the width of the table is fixed, but if the article inside is very long, the text will be overwritten.
Solution:
Add style=word-wrap:break-word; to automatically wrap the line. If you don’t want to wrap the line, you can set the excess content to hide and replace it with an ellipsis:
Add on top of td
Copy the code