css - Vertical alignment inside a simple div -


This is a very simple question, but after a few hours of surfing the web I realize that possibly I'm not getting the concept

I have:

  & lt; Style & gt; #more {width: 190px; Height: 44px; Limit: 1px solid #CCCCCC; Padding-down: 3px; Vertical-aligned: middle;} & lt; / Style & gt; & Lt; Div id = 'more' & gt; My Text & lt; / Div & gt;   

This "my text" does not centrally focus, how can I focus the text vertically?

thanks one lakh

I will use the line-height < / Code> is equal to the height of your div.

  line-height: 44px;   

NB: This will only work on text in one line.

Comments