Well I have such simple divs structure:
<div id="wrapper">
<div id="1" class="block">
1
</div>
<div id="2" class="block">
2
</div>
</div>
Content of #1 can dynamically changed by javascript and its height can be changed depended of content. What I want is to make #2 the same height as #1. I understand that I can use javascript for this purpose but I suggest there must be some not such tricky way to make those divs’ heights equal using only CSS and/or changing divs’ positioning some how.
To expand on my comment, you can’t do it semantically. You have to use a little trick to fake the 100% height. It’s called faux columns, and you can read more here.
In your case, we can fake it by adding a few background divs:
Then changing your CSS like so:
Here’s a working jsFiddle.