Home >Web Front-end >HTML Tutorial >Set the width in the table so that it does not change with the text so that it is fixed_HTML/Xhtml_Web page production
After the table width on the page is set to width="600px", the width is still not fixed. If the text is too long, it will not wrap and the table will be deformed.
Solution:
1.table Set the width, both absolute width and relative width can be used
table-layout:fixed;
Set this attribute, and all other td All are the same width.
After doing this, the width of the table is fixed, but if the article inside is very long, the text will cover it
Solution:
Add style=" in td word-wrap:break-word;" Just wrap the word automatically. If you don’t want to wrap the line, you can hide the excess content and replace it with ellipsis:
Add