jquery - AnythingSlider: Vertical align middle text -
i using anythingslider jquery content slider , having hard time trying vertically center in middle piece of text. have tried following doesn't work.
<li> <div style="display:table-cell; vertical-align:middle;"> <h1> test!! </h1> </div> </li>
do li-elements have fixed height? if try using css , add "line-height: (same height li)" , "vertical-align: middle".
(by way, don't think should using divs inside li)
working example: http://jsfiddle.net/jc7ce/
css:
li{ float: left; height: 100px; width: 100px; line-height: 100px; vertical-align: middle; border: 1px solid red; padding: 10px; }
Comments
Post a Comment