Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

side by side divs with same height

Tags:

html

css

height

How can I put the height of side by side DIVs?

When I change the width of browser, sometimes the left div get higher or shorter than the left.

I want that automatically the left or the right div grows up to became with the same height of the other one.

Setting a display table-row is the best solution for this?

Take a look at the image of the page I want to develop. https://i.sstatic.net/X7aty.png


I solved the problem using display=table-row, table and table-cell. I've added one div to be the table. Now it is perfect! Take a look.

http://jsfiddle.net/tcWCC/47/

like image 619
Ronaldo Avatar asked May 20 '26 15:05

Ronaldo


1 Answers

Here's a solution, also found on SO

http://jsfiddle.net/kaAjW/

Here is the link to original post

How do I keep two divs that are side by side the same height?

The technique is called Faux Columns and here is an article about it

http://www.alistapart.com/articles/fauxcolumns/

like image 118
Grigor Avatar answered May 23 '26 09:05

Grigor