table-layout:fixed with colgroup

1 view
Skip to first unread message

cpt

unread,
Jan 10, 2005, 6:04:49 PM1/10/05
to
Using the property "table-layout:fixed;" is said to speed up the
rendering of tables.

If one formats one's table with this HTML:

<colgroup><col id="col1"><col id="col2"><col id="col3"></colgroup>

Is it better to enclose the "col" tags with "colgroup" tag or to leave
out the "colgroup" tag?

Thanks, CMA

Richard

unread,
Jan 10, 2005, 8:20:50 PM1/10/05
to

> Thanks, CMA


<colgroup> not needed in this group.
The tag sets the properties for each of the columns defined.
Such as height, width, background, border and so on.

I believe ID is not a valid attribute but you should check that for the type
of document you are using.
To find out for sure, run it through www.validator.w3.org


rf

unread,
Jan 10, 2005, 9:02:06 PM1/10/05
to
"Richard" <Anon...@127.001> wrote

[col element]

> The tag sets the properties for each of the columns defined.
> Such as height, width, background, border and so on.

Wrong.

Nowhere in the recomendations are height, background, border "and so on"
defined for either the colgroup element or the col element.


>
> I believe ID is not a valid attribute

Wrong.

The recommendations quite clearly list id as an attribute for the col
element and, for that matter, the colgroup element.

Not a bad score. Two glaring errors in two sentences.

> To find out for sure, run it through www.validator.w3.org

*You* should find out for sure before you spread your usual misinformation
here.

--
Cheers
Richard.


cpt

unread,
Jan 11, 2005, 12:45:44 AM1/11/05
to
Thanks for the answers.
One more question: I read that if one uses "table-layout:fixed"
table rendering is speeded by setting row height. All my rows are
285 px high.
1) Is this true?
2) If true, how does one set row-height for the table,
preferable with a CSS style?
Thanks, CMA

Toby Inkster

unread,
Jan 11, 2005, 3:19:55 AM1/11/05
to
cpt wrote:

> One more question: I read that if one uses "table-layout:fixed"
> table rendering is speeded by setting row height. All my rows are
> 285 px high.
> 1) Is this true?

How do we know if all your rows are 285px high?

> 2) If true, how does one set row-height for the table,
> preferable with a CSS style?

tr { height: 285px; }

--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact

Reply all
Reply to author
Forward
0 new messages