On Fri, 04 Mar 2005 16:51:07 +0800, Derek Fountain <nospam@example.com> wrote:
[color=blue]
> I have a horizontal navigation bar, which is a single row table containing
> the right images.[/color]
A navigation menu usually is just a list of links that take a visitor anywhere
within the site they're at. What makes your navigation menu tabular data?
[color=blue]
> It "stretches" itself across the screen using a
> penultimate td like this:
>
> <td width="100%" background="images/nav_bar/nb_spacer.gif"> </td>[/color]
Ugly hack.
[color=blue]
> which works in all major browsers that I've tried, but doesn't validate. No
> background attribute to the td tag, apparently.[/color]
That might be, because usually tabular data can do just fine without a
background image :-)
From <http://www.w3.org/TR/html401/struct/tables.html#edef-TD>:
<blockquote>
<!ELEMENT (TH|TD) - O (%flow;)* -- table header cell, table data cell-->
<!-- TH is for headers, TD for data, but for cells acting as both use TD -->
<!ATTLIST (TH|TD) -- header or data cell --
%attrs; -- %coreattrs, %i18n, %events --
abbr %Text; #IMPLIED -- abbreviation for header cell --
axis CDATA #IMPLIED -- comma-separated list of related
headers--
headers IDREFS #IMPLIED -- list of id's for header cells --
scope %Scope; #IMPLIED -- scope covered by header cells --
rowspan NUMBER 1 -- number of rows spanned by cell --
colspan NUMBER 1 -- number of cols spanned by cell --
%cellhalign; -- horizontal alignment in cells --
%cellvalign; -- vertical alignment in cells --[color=blue]
>[/color]
</blockquote>
Nope, it's not there.
[color=blue]
> What is the correct way to do this?[/color]
You can check my site for a horizontally layed out navigation menu, using lists.
It is not hard to add the image rollover effect as a background property with
CSS. Google for CSS Rollovers. You can find a something to get you started at:
<http://www.alistapart.com/articles/taminglists/> and
<http://www.alistapart.com/articles/dropdowns/>
--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog |
http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp |
http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen |
http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'