Fixed cell width in table
Filed under: HTML Author:
<style>
table {
table-layout:fixed;
width:50%;
}
td#one {
width:10%;
border:1px solid red;
word-wrap: break-word;
}
td#two {
border:1px solid blue;
overflow:hidden;
}
</style>
</head>
<body>
<table>
<tr>
<td id="one" >long-sentance, long-sentance-long-sentance</td>
<td id="two">long-sentance, long-sentance-long-sentance</td>
</tr>
</table>
Reference : pikasoftware
table {
table-layout:fixed;
width:50%;
}
td#one {
width:10%;
border:1px solid red;
word-wrap: break-word;
}
td#two {
border:1px solid blue;
overflow:hidden;
}
</style>
</head>
<body>
<table>
<tr>
<td id="one" >long-sentance, long-sentance-long-sentance</td>
<td id="two">long-sentance, long-sentance-long-sentance</td>
</tr>
</table>
Reference : pikasoftware


No response to "Fixed cell width in table"
Post a Comment