[whatwg] Tag Soup: Blocks-in-inlines

Billy Wong billyswong at gmail.com
Wed Jan 25 23:57:57 PST 2006

On 1/26/06, Lachlan Hunt <lachlan.hunt at lachy.id.au> wrote:
> Billy Wong wrote:
> > On 1/26/06, Lachlan Hunt <lachlan.hunt at lachy.id.au> wrote:
> >> No, you just need to use the a element and set
> >>    a { display: block; height: Y; width: X; }
> >>
> >> You may not even need to set the width or height or you may need to set
> >> some other styles, but that can accomplish everything that a <div>
> >> inside an <a> can.
> >
> > But the <div> is actually <td> in the real-world case.  How am I
> > supposed to replace a <td> with <a>?
> You could either use display: table-cell; to make it styled like a
> table-cell, unless your table is actually for tabular data.  Other wise,
> if your table is legitimate and non-presentational, you can use
> td a { display: block; height: 100%; width: 100%; }
The border of the table-cell is still not a part of the hyperlink...

> Please direct all future queries on this subject to a suitable CSS
> related forum.
But after all the fuss, you still haven't tell anyone why "block"
elements *cannot* be in an "inline" element, aside from "this is the
Rule"  You asked for an example to show the "need" of it and explain
how the look of it can be achieved through other hacks like making the
<a> displayed like a <td>, something not quite intuitive to me (and
possibly others).  But you haven't show why "inline" have to be
"smaller" than "block" (when both are only meaningful in
presentation), and what is the potential problem it would introduce
when allowed.

I put this email on list again because I am discussing why a
well-formed "Blocks-in-inlines" shall be wrong.  Please correct me.

More information about the whatwg mailing list