On 8/28/10 8:51 AM, Martin wrote:
On 08/28/2010 02:45 PM, David Laakso wrote:
Martin wrote:
Hi there,

I've been googling for it and a:active doesn't work as I'd like it to.

I've got a menu. When I hover over a menu item the colour changes to
orange. I'd like it
to stay orange as long as I'm on this particular page for visitors to
know where they are at the moment.


This i one way you might do it..?

css

li b { color:#ff7f00;
display: block;
padding: 0 2em;
line-height: 40px; color:#ff7f00;
}

markup

<ul>
<li><b>home</b></li>
<li><a href="#">work</a></li>
<li><a href="#">play</a></li>
</ul>

Best,
~d


That's clever.

Thank you!
regards
martin


Not only clever, but better because it takes the link to the current
page out of the markup. You don't really want visitors to reload the
current page, methinks.

(Personally I use <strong> to emphasize "You are here"--but I pick
nits.)

The :active state is the condition when the mouse button is depressed;
the transfer to the linked location takes place when the mouse button
is released. FWIW IE6 (wrongly) applies the :active state when the link
receives keyboard focus (by tabbing to it). Since IE6 does not
understand the :focus pseudo class, this "feature" is actually useful
as a substitute.

Cordially,
David
--
______________________________________________________________________
css-discuss [[email protected]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to