How do you make individual table columns fixed for a specific width, no matter how much text in that column, the column width remains the same?
Tag
<col> is good only for firefox
table-layout:fixed valid for the entire table
Just setting a width doesn't do it
What is the best css property to use for this
Below is the code:
.video{ overflow:hidden; table-layout:fixed; max-width:146px; } .audio{ overflow:hidden; table-layout:fixed; max-width:146px; } .image{ overflow:hidden; table-layout:fixed; max-width:146px; } .qid2{ overflow:hidden; table-layout:fixed; max-width:92px; } <table border=1 id="vidtbl"> <tr> <th>Question No</th> <th>Video</th> <th>Audio</th> <th>Image</th> </tr> <tr> <td class="qid2"></td> <td class="video">images/dolphinvideo.png//////////////////////////////////////</td> <td class="audio">hello</td> <td class="image"></td> </tr> </table>
source share