![]() |
Vertical Center text in a div
I am trying vertical center my text in a div but it always float at top in div. I also tried using a span inside the div and apply css on span but it too not works. I used this css property (vertical-align:middle)
This is Html Code:
<div id="topsmallmenucontainer">This is CSS Code:
#topsmallmenucontainerhttps://www.dropbox.com/s/u3f863jjbw2295r/Capture.JPG |
Hello eetec,
A single line of text is easy to vertically centered with line-height, like this - Code:
.topmenumiddle {line-height It gets more complicated if you want to center a paragraph or div element. See some vertical center examples here. My favorite is the last one which uses a float and a clear. |
Excavator,
This answer is very helpful for me. Thank You. |
| All times are GMT +1. The time now is 07:38 AM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.