How to place two div side-by-side of the same height using CSS?
The two or more different div of same height can be put side-by-side using CSS. Use CSS property to set the height and width of div and use display property to place div in side-by-side format.
The used display property are listed below:
- display:table; This property is used for elements (div) which behaves like table.
- display:table-cell; This property is used for elements (div) which behaves like td.
- display:table-row: This property is used for elements (div) which behaves like tr.
Example 2: This example contains multiple number of div put into side-by-side using CSS.
Attention reader! Don’t stop learning now. Get hold of all the important HTML concepts with the Web Design for Beginners | HTML course.