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.
- How to overlay one div over another div using CSS
- How to give a div tag 100% height of the browser window using CSS
- How to make div height expand with its content using CSS ?
- How to copy the content of a div into another div using jQuery ?
- How to place SVG icons on a round circle side by side to another div using Bootstrap?
- How to create three boxes in the same div using HTML and CSS ?
- HTML width/height Attribute vs CSS width/height Property
- How to center a div within another div?
- How to clear all div's content inside a parent div ?
- How to animate div width and height on mouse hover using jQuery ?
- How to Set full height in box-inner div using bootstrap 4 ?
- How to dynamically get the content height of a div using AngularJS ?
- How to dynamically set the height and width of a div element using jQuery ?
- How to place a div inside an iframe for IE ?
- How to set the div height to auto-adjust to background size?
- Making a div vertically scrollable using CSS
- How to align content of a div to the bottom using CSS ?
- How to horizontally center a div using CSS?
- How to auto-resize an image to fit a div container using CSS?
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.