W3C home > Mailing lists > Public > www-html@w3.org > September 2003

Filling a table cell with a link

From: Steve Buckley <sbuckley@maths.may.ie>
Date: Tue, 30 Sep 2003 23:42:08 +0100 (IST)
To: <www-html@w3.org>
Message-ID: <Pine.LNX.4.33.0309302236300.1569-100000@maths108.maths.may.ie>

Hi,

I've recently switched the navigation system on our Math Dept website
(www.maths.may.ie) from an image-based menu bar to simple text-based menu
bars roughly of the type

   <table class="Menu" ...><tr>
   <td><a href="..."><span>Personnel</span></a></td>...

This has several advantages, including the fact that our secretary can
easily use a cut-and-paste technique to make minor changes in future.
Thus I don't wish to return to using images.

I uses <span> inside the <a> tag together with a

   .Menu Span{width:100%}

specification in our CSS file because I want the link to fill the table
cell.  I am aware this is invalid CSS since width cannot be used for
inline elements but it works in MSIE 5.50.  However it does not work in
Opera 6.02 or Netscape 4.5, the other two browsers to which I have easy
access.

Is there a legal HTML-CSS way of getting the same effect?  Since this is a
non-essential feature, I don't really care if it doesn't work on older
browsers such as Netscape 4.x, but I don't like using bad CSS, especially
as it is unrecognised by a browser such as Opera 6.02.  If no fix exists,
perhaps it suggests that a block-level version of the <a> tag should be
added to a future version of XHTML?

Thanks,
Steve Buckley
Received on Tuesday, 30 September 2003 18:45:59 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:58 GMT