[ACCEPTED]-Style CSS table td-css-tables
td {
width: 50px;
}
I think something like that might work for 8 you. Obviously, you can adjust the actual 7 width to your needs.
And if you multiple 6 table and only want to fix one, give the 5 one in question an id:
<table id="fixed_table">
and then in the css, you 4 could say:
#fixed_table td {
width: 50px;
}
and it would only affect tds in 3 that particular table. Of course, if you 2 wanted to affect some tables but not others, you 1 would use a class instead of an id.
You could use a combination of width
and max-width
:
td {
border: 1px solid #ccc;
width: 2em; /* or whatever... */
max-width: 2em; /* or whatever... */
height: 2em; /* or whatever... */
line-height: 2em; /* or whatever... */
text-align: center; /* a personal aesthetic choice... */
overflow: hidden; /* to prevent overflow... */
}
(Please note that 3 while I use jQuery in the demo, that's only 2 to generate contents and isn't necessary 1 for the demo to work.)
Set fixed widths on the columns.
0
More Related questions
We use cookies to improve the performance of the site. By staying on our site, you agree to the terms of use of cookies.