Jump to content

how to make table's first column always take 100% - 200px?


rain13

Recommended Posts

At the moment right side is 200 px and left is auto. when I set left side to 100% then right wont be 200px anymore. How do I create that label so that right side would always be 200 px and left side would take rest of width. Just like forums have fixed width for user info and dynamic width for topic data.. I want that table to be similar.

<body><table>  <tbody>	<tr>	  <td style="width:auto; background:lightblue "><b>posted by author on date</b><hr>Message</td>	  <td style="width:200px; background:gray " >author<br>registered user<br>posts n+1</td>	</tr>  </tbody></table>

Link to comment
Share on other sites

At the moment right side is 200 px and left is auto. when I set left side to 100% then right wont be 200px anymore. How do I create that label so that right side would always be 200 px and left side would take rest of width. Just like forums have fixed width for user info and dynamic width for topic data.. I want that table to be similar.
<body><table>  <tbody>	<tr>	  <td style="width:auto; background:lightblue "><b>posted by author on date</b><hr>Message</td>	  <td style="width:200px; background:gray " >author<br>registered user<br>posts n+1</td>	</tr>  </tbody></table>

make your table 100% and just set the width of column 2. Column 1 will fill the rest.
<body><table style="width:100%">  <tbody>	<tr>	  <td style=" background:lightblue "><b>posted by author on date</b><hr>Message</td>	  <td style="width:200px; background:gray " >author<br>registered user<br>posts n+1</td>	</tr>  </tbody></table></body>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...