centralize elements "a" in a div [duplicate]

0

How do I centralize a link "a" horizontally and vertically in the center of a div?

 <div id="header_right">
    <a>A</a>
    <a>B</a>
    <a>C</a>
 </div>

CSS:

#header_right {
    width: 342px;
    background: yellow;
}
    
asked by anonymous 22.04.2016 / 20:40

2 answers

1

Add in css:

text-align: center;
vertical-align: middle;
    
22.04.2016 / 20:48
0
<div id="header_right">
 <table width="100%" height="100%">
     <tr valing="middle" align="center">
         <td><a>A</a></td>
         <td><a>B</a></td>
         <td><a>C</a></td>
     </tr>
 </table>
 </div>
    
22.04.2016 / 21:05