Menu horizontal avec recherche
Résolu/Fermé
lotfii
-
5 avril 2010 à 12:16
avion-f16 Messages postés 19246 Date d'inscription dimanche 17 février 2008 Statut Contributeur Dernière intervention 21 avril 2024 - 5 avril 2010 à 20:08
avion-f16 Messages postés 19246 Date d'inscription dimanche 17 février 2008 Statut Contributeur Dernière intervention 21 avril 2024 - 5 avril 2010 à 20:08
A voir également:
- Menu horizontal avec recherche
- Menu déroulant excel - Guide
- Recherche musique - Guide
- Google recherche par image - Guide
- Menu démarrer windows 11 - Guide
- Recherche automatique des chaînes ne fonctionne pas - Guide
2 réponses
notobe
Messages postés
1952
Date d'inscription
mercredi 11 novembre 2009
Statut
Membre
Dernière intervention
8 juillet 2011
213
5 avril 2010 à 12:22
5 avril 2010 à 12:22
Applique une classe :
Et tu styles cette classe "recherche" dans ta CSS comme tu le veux.
<li><a href="#" class="recherche">RECHERCHE <input type="text" name="recherche" /></a></li>
Et tu styles cette classe "recherche" dans ta CSS comme tu le veux.
avion-f16
Messages postés
19246
Date d'inscription
dimanche 17 février 2008
Statut
Contributeur
Dernière intervention
21 avril 2024
4 498
5 avril 2010 à 13:39
5 avril 2010 à 13:39
Ton HTML :
Et le CSS :
<div class="menu"> <ul> <li><a href="#" >ACCUEIL</a></li> <li> <a href="#" id="current">REUNION EN LIGNE</a> <ul> <li><a href="../reunion_en_ligne.html">conference video</a></li> <li><a href="#">Appel</a></li> <li><a href="#">Tcaht texte</a></li> <li><a href="#">Partage d'ecran</a></li> </ul> </li> <li> <a href="#">ESPACE CLIENT</a> <ul> <li><a href="">Reserver </a></li> <li><a href="#">s'abonner</a></li> <li><a href="#">se connecter</a></li> <li><a href="#">autres</a></li> </ul> </li> <li><a href="../compagnie.html">CONTACT</a></li> <li class="recherche"><label for="recherche">RECHERCHE</label> <input type="text" name="recherche" id="recherche"/></a></li> </ul> </div>
Et le CSS :
.menu { border:none; border:0px; margin:0px; padding:0px; font: 67.5% "Lucida Sans Unicode", "Bitstream Vera Sans", "Trebuchet Unicode MS", "Lucida Grande", Verdana, Helvetica, sans-serif; font-size:14px; font-weight:bold; } .menu ul { background:#333333; height:35px; list-style:none; margin:0; padding:0; } .menu li { float:left; padding:0px; font-size: 12px; } .menu li a, .menu li label { background:#333333 url("images/seperator.gif") bottom right no-repeat; color:#cccccc; display:block; font-weight:normal; line-height:35px; margin:0px; padding:0px 25px; text-align:center; text-decoration:none; } .menu li label { display:inline;} .menu li a:hover, .menu ul li:hover a { background: #2580a2 url("images/hover.gif") bottom center no-repeat; color:#FFFFFF; text-decoration:none; } .menu li ul { background:#333333; display:none; height:auto; padding:0px; margin:0px; border:0px; position:absolute; width:225px; z-index:200; /*top:1em; /*left:0;*/ } .menu li:hover ul{ display:block; } .menu li li { background:url('images/sub_sep.gif') bottom left no-repeat; display:block; float:none; margin:0px; padding:0px; width:225px; } .menu li:hover li a { background:none; } .menu li ul a { display:block; height:35px; font-size:12px; font-style:normal; margin:0px; padding:0px 10px 0px 15px; text-align:left; } .menu li ul a:hover, .menu li ul li:hover a { background:#2580a2 url('images/hover_sub.gif') center left no-repeat; border:0px; color:#ffffff; text-decoration:none; } .menu p{ clear:left; } a:link { color:#000; text-decoration:none: } a:hover { color:#06F; text-decoration:none; } a:visited { color:#F00; text-decoration:none; } .menu ul li.recherche { float:right; } .menu ul li.recherche a:hover { background:none; }Je me suis permis de déplacer la recherche à droite.
avion-f16
Messages postés
19246
Date d'inscription
dimanche 17 février 2008
Statut
Contributeur
Dernière intervention
21 avril 2024
4 498
5 avril 2010 à 18:44
5 avril 2010 à 18:44
Le coller à "Contact" et en-dessous de "Accueil" ?
avion-f16
Messages postés
19246
Date d'inscription
dimanche 17 février 2008
Statut
Contributeur
Dernière intervention
21 avril 2024
4 498
5 avril 2010 à 20:08
5 avril 2010 à 20:08
Retires cette partie (à la fin) :
.menu ul li.recherche { float:right; }
5 avril 2010 à 12:35
le code avec html
</ul>
<li><a href="#" class="rech">RECHERCHE <input type="text" name="recherche" /></a></li>
et pour le CSS voila le code
a.rech:hover, li:hover a.rech
{
background:#333333 url("images/seperator.gif") bottom right no-repeat;
color:#cccccc;
text-decoration:none;
border:0px;
}
comment garder ça sur la meme ligne.??
merci pour ta reponse c'est gentil