I'm pretty sure this is a pure HTML/CSS issue (not Tapestry-specific).
Also, you didn't post your HTML, or whether your horizontal menu is
updated upon selection via custom javascript, ajax refresh, or whole
page refresh.

Regardless, I don't believe the "active" pseudo-class is what you want
here. It's effect is undone when the menu is redrawn.

    http://www.w3schools.com/cssref/tryit.asp?filename=trycss_sel_active

Instead, what I generally do is have the server side set a certain CSS
class name on the selected menu item (e.g. <li class="selected-item">)
and then I use something like #horizontal-menu li.selected-item a {
..... } to specify a distinct style.

Hope this helps...

On Thu, Dec 29, 2011 at 7:01 AM, Chris Mylonas <ch...@opencsta.org> wrote:
> To my fellow Tapestry aficionados,
>
> (Sorry if it made it the first time - i got a message not delivered back from 
> my mail server (gmail))
>
> I've been plugging away with a mock up but made a bigger effort with the CSS 
> than normal because it's been a while.  I have a little niggle though..
> The a:hover works on the horizontal menu I have but not the a:active (They 
> share the same rule below)
>
> The horizontal-menu looks like this
> [ FIRST | MIDDLE | MIDDLE | MIDDLE | MIDDLE | MIDDLE | LAST ]
>
> The mouse over (hover rule) works all along it however the active page 
> doesn't keep the highlighted menu item.
>
> Is there some special tapestry magic required to make the active page work in 
> the nav bar?
>
> Cheers
> Chris
>
> #horizontal-menu li a:hover, #horizontal-menu li a:active {
>        background: url( images/bg-li-main.gif ) repeat-x scroll center top
>                transparent;
>        width: 160px;
>        height: 46px;
>        overflow: inherit;
>        color: #FFFFFF;
>        text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.8);
> }
>
> #horizontal-menu .last a:hover {
>        background: url( images/bg-li-last.png ) no-repeat scroll 0 0
>                transparent;
> }
>
> #horizontal-menu .first a:hover {
>        background: url( images/bg-li-first.png ) no-repeat scroll 0 0
>                transparent;
> }
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to