PDA

View Full Version : How can I make the columns fixed witdths w/CSS


keano
05-18-2006, 10:45 PM
If you look at the attached the columns have no width they just stretch.
For instance the left column th I would like to bring the column over.

keano
05-18-2006, 10:45 PM
sorry for double zip post

keano
05-18-2006, 10:56 PM
Ok I got it to work by using following:
<tr>
<th width="20%" scope="col">Student Name</th>
<th width="20%" scope="col">Date of Birth</th>
<th width="20%" scope="col">Class</th>
<th width="20%" scope="col">ID</th>
</tr>


in the CSS sheet I put table with at 500px

But must the th percents add up to a 100%?

domedia
05-19-2006, 05:39 AM
If you Table is set with pixels, and you want the columns to not change with, set their width in pixels as well.