css - How to vertically align text inside div without using inline-height -


in following example trying align text in middle vertically & horizontally.

for reason doesn't come correctly tried few example also

http://jsfiddle.net/kayen/jbnbg/

here can css & result: http://jsfiddle.net/surendravsingh/amcnz/31/

remove height .boxcaption.

.boxcaption{     float: left;     position: absolute;     background: #000;     width: 100%;     text-align:center; /*add this*/     padding:5px 0 0 0; /*add this*/     opacity: .6;     /* ie 5-7 */     filter: progid:dximagetransform.microsoft.alpha(opacity=60);     /* ie 8 */     -ms-filter: "progid:dximagetransform.microsoft.alpha(opacity=60)"; } 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -