divers tentatives infructueuses de centrage vertical

master
iGor milhit 2014-08-10 21:06:55 +02:00
parent 169560bc59
commit d8d7512691
2 changed files with 39 additions and 41 deletions

View File

@ -15,50 +15,49 @@
<body> <body>
<nav> <!-- Le contenant de la page, qui est un menu en réalité --> <article id="accueil">
<ul> <article class="entree">
<li class="entree"> <div class="wraptocenter">
<a href="" title="">entrée 01</a> <a href="" title="">entrée 01 mais sur deux lignes ?</a>
</li> </div>
</article>
<li class="entree"> <article class="entree">
<a href="#" title="">entrée 02</a> <a href="#" title="">entrée 02</a>
</li> </article>
<li class="entree"> <article class="entree">
<a href="" title="">entrée 03</a> <a href="" title="">entrée 03</a>
</li> </article>
<li class="entree"> <article class="entree">
<a href="#" title="">entrée 04</a> <a href="#" title="">entrée 04</a>
</li> </article>
<li class="entree"> <article class="entree">
<a href="" title="">entrée 05</a> <a href="" title="">entrée 05</a>
</li> </article>
<li class="entree"> <article class="entree">
<a href="#" title="">entrée 06</a> <a href="#" title="">entrée 06</a>
</li> </article>
<li class="entree"> <article class="entree">
<a href="#" title="">entrée 07</a> <a href="#" title="">entrée 07</a>
</li> </article>
<li class="entree"> <article class="entree">
<a href="" title="">entrée 08</a> <a href="" title="">entrée 08</a>
</li> </article>
<li class="entree"> <article class="entree">
<a href="#" title="">entrée 09</a> <a href="#" title="">entrée 09</a>
</li> </article>
</ul> </article>
</nav>
</body> </body>
</html> </html>

View File

@ -9,31 +9,30 @@ body {
width: 100%; width: 100%;
} }
nav { #accueil {
max-width: 80%; max-width: 66%;
margin: 0px auto; margin: 0px auto;
} }
ul { .entree {
list-style: none outside none; display: inline;
} width: 8em;
height: 8em;
li {
width: 23%;
height: 0px;
padding-bottom: 23%;
margin: 1%;
text-align: center; text-align: center;
background-color: rgba(34, 34, 34, .8); background-color: rgba(34, 34, 34, .8);
color: rgba(231, 231, 231, .7); color: rgba(231, 231, 231, .7);
font-size: 200%;
float: left;
border-radius: 3px; border-radius: 3px;
margin: 2%;
} }
a { .wraptocenter {
padding-top: 40%; display: table-cell;
vertical-align: middle;
}
.wraptocenter a {
text-decoration: none; text-decoration: none;
vertical-align: middle;
} }