开发者

How to vertically center more than one line of text (works only on chrome)?

开发者 https://www.devze.com 2023-03-13 07:32 出处:网络
I got my answer from stackoverflow but found out today that the solution only works in Chrome. Opera, IE & Firefox puts the menu links (they are dynamically generated by WP) at the top. I\'ve been

I got my answer from stackoverflow but found out today that the solution only works in Chrome. Opera, IE & Firefox puts the menu links (they are dynamically generated by WP) at the top. I've been trying to fix this for the past hour but to no avail...

Her开发者_如何转开发e's the fiddle: http://jsfiddle.net/PjA6s/

If the CSS solution is complex could this be done with jQuery? Could you please direct me to a tutorial on how to achieve this (css, jquery)?

Thanks!


The css3 method described in the other solution is ideal, but you could use the table-cell method. Like this: http://jsfiddle.net/h7Htk/

0

精彩评论

暂无评论...
验证码 换一张
取 消