Page 1 of 1

[Résolu]"a:active" ne marche qu'à l'instant du clic..

Posted: Mon Dec 03, 2007 3:40 pm
by xolth
Bonjour,
J'ai un petit problème avec une image en rollover:
Un bouton devrait rester "allumé" une fois cliqué, mais ce n'est pas le cas.
html:

{cms_selflink page="home"}
{cms_selflink page="page-test"}
{cms_selflink page="plan-du-site"}

css:
#menuPrincipal a:hover { background-image: url(images/menuPrincipalOver2.gif); background-repeat:no-repeat; background-position:top center; color:#fff;}
#menuPrincipal a:active { background-image: url(images/menuPrincipalOver.gif); background-repeat:no-repeat; background-position:top center; color:#fff;}

Re: [Résolu]"a:active" ne marche qu'à l'instant du clic..

Posted: Tue Dec 04, 2007 12:59 am
by xolth
La solution par moi-même ici:
http://forum.hardware.fr/hfr/Programmat ... 0146_1.htm

(A la différence que j'ai crée des usertags au lieu de mettre direct le code dans le template.. :

{menuhoriz0}
{menuhoriz1}
{menuhoriz2}
{menuhoriz3}

contenu du tag menuhoriz0:
if
( $_SERVER['REQUEST_URI']=="/cmsms/index.php?page=home" )
{ echo 'home'; }
else
{ echo 'home'; }