Home › Forums › CSS › Center Vertically in CSS? › Re: Center Vertically in CSS?
February 16, 2010 at 7:43 pm
#71015
Participant
It would be nice if you could provide a code too. Then its much easyer to help You. But you could try one trick that has helped me a lot. Try this rule: line-height: ???px
??? = the height of your grey div.
For example:
Code:
vertycally center
Code:
#mydiv{
height:100px;
line-height:100px;
overflow:hidden /*This is here just in case you have more than one row of text*/
}
height:100px;
line-height:100px;
overflow:hidden /*This is here just in case you have more than one row of text*/
}
works only if you have one row of text.
But without the code i cannot help much more.