开发者

Centering content vertically (and horizontally) in a div

First the example: http://jsfiddle.net/5S3mk/3/

I have a table whose columns need to be sortable so in the table header there should be links for sorting. The columns themselves are dynamic and their width is not known in advance.

In order to center开发者_JAVA技巧 the header content horizontally I used the recipe from here.

Now I'm having trouble with adjusting the spans inside container div to center vertically. Does anyone have any idea how to do this (legacy browser are not an issue)?


Here you have one way of doing it. It uses a little jQuery script, but it is really simple.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜