Center position vertical


Hey Fellas..

i have a question about the position of the a>link in the div> button not horizontal but vertical,
how can i manage to bring the text sitting in the middle of the button vertical? :confused:

text-align: center work only for the horizontal movement..



I highly recommend you to read this guide, it should contain the answer. You can always use padding, given the fact you know the height of your text, i can only help you with that if you provide me with your code


all right, i wiil read that guide immediately :smile:
in th emean time here is my code:

div {
height: 50px;
width: 120px;
border-color: #6495ED;
background-color: #BCD2EE;
border-style: solid;
border-width: 2px;
border-radius: 5px;
margin: auto;
text-align: center;

a {
text-decoration: none;
color: blue;


i put your code in a bin, added box-sizing (which i explained already, didn't i?) and added padding 15px. the div is 50px in height, the link is 19px (let's say 20, is easier) which mean you have 30px left. 15 above and 15 below


for the record:

i managed to do it with the line-height set to 50px cause the height of the element was 50px :smile: