Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

What ever happened to colspan='*' ?

7 views
Skip to first unread message

pete

unread,
Jul 10, 2011, 9:17:20 PM7/10/11
to
There once was a very handy construct: colspan='*' meaning "span this
column and all the rest of the columns to its right in this table." I
was surprised to see that the production now gives an error in the
html validator.

I'm too lazy to count by hand all the columns to be spanned: that's
what software is for, after all.

What's the modern equivalent of colspan='*', if any?

Thanks!

Jukka K. Korpela

unread,
Jul 11, 2011, 12:02:56 AM7/11/11
to
2011-07-11 4:17, pete wrote:

> There once was a very handy construct: colspan='*' meaning "span this
> column and all the rest of the columns to its right in this table."

I don't think colspan='*' was ever supported by browsers, and it surely
wasn't in the specifications. You must be thinking of colspan='0', which
is defined in HTML 4:
http://www.w3.org/TR/html4/struct/tables.html#adef-colspan

> I was surprised to see that the production now gives an error in the
> html validator.

For which document? I think you must be using <!doctype html>, which
puts the W3C Markup Validator into "HTML5 mode", where it stops being a
markup validator (as per SGML or XML) and acts as an HTML5 linter,
running mixed tests purported to check conformance to the latest HTML5
draft.

In HTML5 drafts, colspan='0' is disallowed (but rowspan='0' is allowed),
for reasons that appear to be partly implementation difficulties, partly
resignation, facing the experience that most browsers still don't
implement it. I tested with a few browsers, and only Firefox implements
colspan='0' as per HTML4, and even it appears to fail when the cell is
not the last one in the row.

> I'm too lazy to count by hand all the columns to be spanned: that's
> what software is for, after all.

You might wish to raise the issue in the WHATWG discussion list, but I
wouldn't bother. Discussions on this topic there date back to at least
year 2006, and the browser situation hasn't essentially changed.

> What's the modern equivalent of colspan='*', if any?

Making your authoring software compute a suitable value for colspan so
that the rest of the columns will be covered.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

pete

unread,
Jul 11, 2011, 1:13:59 AM7/11/11
to
On Jul 11, 12:02 am, "Jukka K. Korpela" <jkorp...@cs.tut.fi> wrote:
> 2011-07-11 4:17, pete wrote:

Thanks, Jukka, for your very thoughtful answer.

> > What's the modern equivalent of colspan='*', if any?
>
> Making your authoring software compute a suitable value for colspan so
> that the rest of the columns will be covered.

I'll be studying the notepad readme first thing in the morning :-)

-- pete


Jukka K. Korpela

unread,
Jul 11, 2011, 7:42:39 AM7/11/11
to
2011-07-11 8:13, pete wrote:

>>> What's the modern equivalent of colspan='*', if any?
>>
>> Making your authoring software compute a suitable value for colspan so
>> that the rest of the columns will be covered.
>
> I'll be studying the notepad readme first thing in the morning :-)

I'm afraid you would have to look at the source code. :-)

Even in Notepad++ or other fairly advanced editors, it might be
difficult to program such things.

I wasn't thinking of creation of tables "by hand and macros" in editors.
Rather, the software you use to generate an HTML table from some tabular
data in some database, Excel file, TSV file, or whatever. There it
should be fairly trivial to make it count columns.

Or when using a wysiwyg program (sorry if the idea sounds offensive),
you might expect the program to generate markup with suitable values for
colspan attributes when you combine cells.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

richard

unread,
Jul 11, 2011, 10:28:18 AM7/11/11
to

Just give it more columns than you have.
If the columns don't exist, the excess is ignored. Usually.

Denis McMahon

unread,
Jul 11, 2011, 4:20:57 PM7/11/11
to
On Sun, 10 Jul 2011 18:17:20 -0700, pete wrote:

> There once was a very handy construct: colspan='*' meaning "span this
> column and all the rest of the columns to its right in this table." I
> was surprised to see that the production now gives an error in the html
> validator.

I recall * being used in framesets for "the rest of the page", but never
in tables. Could you be confusing the two?

Rgds

Denis McMahon

0 new messages