Page 1 sur 1

[ Résolu ] Centrer le texte du lien dans son bloc ?

Publié : 14 mai 2005, 17:01
par Express
Salut tous ;)
Je cherche à aligné le texte de mes liens inclus dans mon bloc,mais la définition : vertical-align: middle ne fonctionne pas avec,que dois-je utiliser ?
Merci de votre aide .
PJ code de la page en question, il s'agit de centrer le texte de la div class intitulé : .liens_haut a

Code : Tout sélectionner

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
  <meta
 content="text/html; charset=ISO-8859-1"
 http-equiv="content-type" />
  <title>nvu1</title>
  <style type="text/css">
  body { margin: 0px;
    padding: 0px;
    font-family: comic sans ms;
    font-size: 0.8em;
    background-image: url(file:///home/chris/Firefox_wallpaper.png);
    }

  #contenu { position: absolute;
    width: 100%;
    background-color: transparent;
    background-image: url(file:///home/chris/Firefox_wallpaper.png);
    }

  #header { border-style: solid;
    font-family: Dingbats;
    text-align: center;
    font-weight: bold;
    font-style: normal;
    color: rgb(102, 0, 204);
    font-size: xx-large;
    background-color: transparent;
    position: relative;
    height: 90px;
    }

  .liens_haut { border-style: solid;
    position: absolute;
    margin-left: 14em;
    margin-top: 30px;
    width: 80%;
    height: 25px;
    }

  .liens_haut a { border: 1px solid gray;
    background: transparent none repeat scroll 0% 50%;
    -moz-background-clip: initial;
    -moz-background-origin: initial;
    -moz-background-inline-policy: initial;
    display: block;
    text-align: center;
    text-decoration: none;
    color: rgb(0, 0, 0);
    font-family: comic sans ms;
    margin-right: 5px;
    height: 20px;
    width: 80px;
    margin-top: 1px;
    position: relative;
    }

  .liens_haut a:hover { border: 1px solid gray;
    background: rgb(204, 204, 204) none repeat scroll 0% 50%;
    -moz-background-clip: initial;
    -moz-background-origin: initial;
    -moz-background-inline-policy: initial;
    color: rgb(255, 255, 255);
    }

  .liens_haut a:active { border: 1px solid gray;
    background: gray none repeat scroll 0% 50%;
    -moz-background-clip: initial;
    -moz-background-origin: initial;
    -moz-background-inline-policy: initial;
    color: rgb(255, 255, 255);
    }

  .liens_haut ul { list-style-type: none;
    width: 100%;
    }

  .liens_haut li { float: left;
    }

  .cadre_menu { border-color: rgb(204, 204, 204);
    border-width: 1px;
    position: absolute;
    background-color: transparent;
    margin-top: 5em;
    width: 110px;
    margin-left: 2.7em;
    }

  .cadre_menu2 { position: absolute;
    background-color: transparent;
    text-align: center;
    width: 10.6em;
    margin-top: 40em;
    margin-left: 1.5em;
    }

  .cadre_menu a { border: 1px solid gray;
    display: block;
    height: 30px;
    width: 100px;
    margin-left: 4px;
    margin-bottom: 15px;
    }

  .cadre_menu a:hover { background: rgb(204, 204, 204) none repeat scroll 0% 50%;
    -moz-background-clip: initial;
    -moz-background-origin: initial;
    -moz-background-inline-policy: initial;
    color: rgb(68, 17, 17);
    }

  .cadre_menu2 a:hover { border-style: none;
    background-color: transparent;
    }

  #centrale { border-style: solid;
    border-width: 0.1px;
    background-repeat: no-repeat;
    background-position: center;
    position: relative;
    opacity: 1;
    background-color: transparent;
    height: 700px;
    margin-top: 5em;
    width: 80%;
    margin-left: 14em;
    }

  #pied { border-color: rgb(192, 192, 192);
    border-width: 0.2px;
    height: 50px;
    background-color: transparent;
    }

  #pied a { font-weight: bold;
    font-family: Arial,Helvetica,sans-serif;
    color: rgb(51, 204, 0);
    text-decoration: blink;
    }

  #pied p { font-style: italic;
    font-weight: normal;
    }

  .p1 { margin: 0pt 0pt 20px;
    font-weight: bold;
    text-decoration: none;
    line-height: normal;
    font-size: large;
    }

  ul, li { margin: 0pt;
    padding: 0pt;
    list-style-type: none;
    line-height: 30px;
    text-align: center;
    }

  a:link { text-decoration: none;
    color: rgb(0, 0, 0);
    }

  a:visited { text-decoration: none;
    color: rgb(153, 153, 153);
    }

  a:hover { text-decoration: none;
    cursor: crosshair;
    background-color: rgb(255, 255, 255);
    color: rgb(102, 51, 102);
    }

  a img { border: 0pt none ;
    }


  </style>
</head>
<body>
<div id="contenu">
<div id="header">
<h3>dfgdsfgdfgdsfgdsfgdfg&nbsp;</h3>
</div>
<div class="liens_haut">
<ul>
  <li><a
 href="news.htm">M&egrave;le</a></li>
  <li><a
 href="generique.htm">G&eacute;n&eacute;rique</a></li>
  <li><a
 href="acteurs.htm">Les Acteurs</a></li>
</ul>
</div>
<div class="cadre_menu">
<ul>
  <li><a
 href="news.htm">News!</a></li>
  <li><a
 href="generique.htm">G&eacute;n&eacute;rique</a></li>
  <li><a
 href="acteurs.htm">Les Acteurs</a></li>
  <li><a
 href="ldo.htm">ldo</a></li>
  <li><a
 href="lieux.htm">Les Lieux</a></li>
  <li><a
 href="coulisses.htm">Les Coulisses</a></li>
  <li><a
 href="famille.htm">La Famille</a></li>
  <li><a
 href="dossiers.htm">Dossiers</a></li>
</ul>
</div>
<div class="cadre_menu2">
<a href="http://www.nvu.com/"><img
 alt="Document fait avec Nvu"
 src="http://www.nvu.com/fait_avec_Nvu.png" /></a></div>
<div id="centrale">
</div>
<div id="pied">
<p>Ce site est
valide <a
 href="http://validator.w3.org/check?uri=referer">
XHTML.1</a> |
Copyright-->Anyone |
<br />
</p>
</div>
</div>
</body>
</html>
[/quote]

Merci de votre aide ;)

Publié : 14 mai 2005, 17:16
par Express
Par : line-height: 20px;