html - Vertical align multiple lines break out -


i want vertically align text in links :

what want

the whole block links, , same size. tried set line-height height of container center , reset line-height span defined line-height inside link didn't work :

what get

here's code :

                    <section class="faq">                         <nav>                             <ul class="nav nav--stacked">                                 <li><a href=""><span>où est la bulle à verre la plus proche ?</span></a></li>                                 <li><a href=""><span>quand sont les ramassages ?</span></a></li>                                 <li><a href=""><span>x</span></a></li>                                 <li><a href=""><span>x</span></a></li>                                 <li><a href=""><span>x</span></a></li>                             </ul>                         </nav>                     </section> 

and css:

.faq {   display: block;   padding: 15px;   height: 100px;   line-height: 100px;   padding-left: 90px;   background: #f2f2f2;   color: #bdbdbd;   text-transform: uppercase;   margin-bottom: 10px;   font-size: 13px; }  .faq span {   line-height: 1.7; } 

tried "table-cell" way, didn't work. also, if of have cleaner solution, awesome , appreciated !

live version here

i think need change:

.faq {     display: block;     padding: 15px;     height: 100px;     /*line-height: 100px;*/ <---- remove     padding-left: 90px;     background: #f2f2f2;     color: #bdbdbd;     text-transform: uppercase;     /*margin-bottom: 10px;*/ <--- delete     font-size: 13px; }  .nav--stacked > li {     display: list-item;     margin-bottom: 20px; }   .nav--stacked > li > {     display: table-cell;     vertical-align: middle;     width: 237px; } 

Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -