How to vertically align
  • elements in
      ?
  • 前端 未结 4 1373
    慢半拍i
    慢半拍i 2020-11-28 05:09

    I have a horizontal

      and I need to center each
    • in it vertically. My markup is below. Each
    • has a border
    4条回答
    •  一向
      一向 (楼主)
      2020-11-28 05:32

      I assume that since you're using an XML declaration, you're not worrying about IE or older browsers.

      So you can use display:table-cell and display:table-row like so:

      
      
      
      
          
          
      
      
          
      
      
      

    提交回复
    热议问题