In the example below, when the width of the td where the name is located is 60px, if there is less text in the second line, the display will be normal. If there is more text in the second line, the display will be abnormal
< ;head>
Script Home < ;style type="text/css">
.mTable{width:200px;border:1px solid #666;border-collapse:collapse}
.mTable td{border:1px solid #666}
Name: |
Someone |
Personal profile |
Name: |
Someone |
Personal profilePersonal profilePersonal profile td>
|
Solution one: (for the The width of the two-column td is also set)
< !DOCTYPE HTML>
< ;title>Script Home
Name: |
Someone |
Personal profile |
< ;/tr>
Name: |
Someone |
Personal profilePersonal profilePersonal profile |
< /body> Copy the code
The code is as follows: