How to align a div to the top of its parent but keeping its inline-block behaviour?

后端 未结 5 2096
后悔当初
后悔当初 2020-11-29 21:38

See: http://jsfiddle.net/b2BpB/1/

Q: How can you make box1 and box3 align to the top of the parent div boxContainer?

#boxContainerContai         


        
5条回答
  •  感动是毒
    2020-11-29 21:53

    Use vertical-align:top; for the element you want at the top, as I have demonstrated on your jsfiddle.

    http://www.brunildo.org/test/inline-block.html

提交回复
热议问题