How to center horizontal table-cell

前端 未结 4 1331
后悔当初
后悔当初 2020-12-16 11:03

I want the Content A, Content B, and Content C columns to be horizontally centered. I have this code been trying to add

http://jsfiddle.net/hsX5q/24/

HTML:m

4条回答
  •  旧巷少年郎
    2020-12-16 11:38

    Sometimes you have things other than text inside a table cell that you'd like to be horizontally centered. In order to do this, first set up some css...

    
    

    Then declare a div with class="centered" inside each table cell you want centered.

    
        
    Anything: text, controls, etc... will be horizontally centered.

提交回复
热议问题