|
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hello,
I have a table with 3 columns and I am using the usual header, footer and body sections. The first column has only an input (check box). Is it possible to make column 1 and 3 fixed width and column 2 get the remaining width? Thank You, Miguel |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
On 2008-02-29, shapper <mdmoura@gmail.com> wrote:
> Hello, > > I have a table with 3 columns and I am using the usual header, footer > and body sections. > > The first column has only an input (check box). > > Is it possible to make column 1 and 3 fixed width and column 2 get the > remaining width? Yes. Just set the total width you want on the whole table (which might be a percentage), and then set the fixed widths you want on cells in columns 1 and 3. |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
On Feb 29, 10:29 pm, Ben C <spams...@spam.eggs> wrote:
> On 2008-02-29, shapper <mdmo...@gmail.com> wrote: > > > Hello, > > > I have a table with 3 columns and I am using the usual header, footer > > and body sections. > > > The first column has only an input (check box). > > > Is it possible to make column 1 and 3 fixed width and column 2 get the > > remaining width? > > Yes. Just set the total width you want on the whole table (which might > be a percentage), and then set the fixed widths you want on cells in > columns 1 and 3. Ben, You mean in tbody cells? td? I am asking because I added col tags to the table and defined the widths in it but it does not work. I was reading about cols and it seemed the logical solution. Thanks, Miguel |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
On 2008-03-02, shapper <mdmoura@gmail.com> wrote:
> On Feb 29, 10:29 pm, Ben C <spams...@spam.eggs> wrote: >> On 2008-02-29, shapper <mdmo...@gmail.com> wrote: >> >> > Hello, >> >> > I have a table with 3 columns and I am using the usual header, footer >> > and body sections. >> >> > The first column has only an input (check box). >> >> > Is it possible to make column 1 and 3 fixed width and column 2 get the >> > remaining width? >> >> Yes. Just set the total width you want on the whole table (which might >> be a percentage), and then set the fixed widths you want on cells in >> columns 1 and 3. > > Ben, > > You mean in tbody cells? td? > I am asking because I added col tags to the table and defined the > widths in it but it does not work. > > I was reading about cols and it seemed the logical solution. To set the width of a column you just set width on any (non-colspanning) <td> in that column. Setting different widths on <td>s in the same column is illogical since all the cells in a column will always have the same width. If you do that most browsers will assume the maximum of the widths you set in a column is the one you want. Don't bother with col or colgroup elements. I don't think they work in Firefox. They're a bit of a throwback to the days before CSS as a crude way to apply presentation to multiple elements at once (CSS selectors do that job nowadays). |
|
![]() |
| Outils de la discussion | |
|
|