Customization
I am making a site with a simple two-column layout. Columns will have different heights (one above the other) and dynamic heights (each page content is different). The background color of the two columns should reach the lowest point of the longest column content.
For visual learners among you, CSS-Tricks has some good illustrations.


Attempt
I am using the One True Layout Method mentioned on the same CSS-Tricks page as halfway down.
I recreated it on jsFiddle here .
Here is the appropriate coding
HTML
<a href="#area1">Go To Section 1</a> <a href="#area2">Go To Section 2</a> <a href="#area3">Go To Section 3</a> <div id="hold"> <div id="col1"> Content Column 1 </div> <div id="col2"> Content Column 2 <h2 id="area1">Section 1</h2> <img src="http://placehold.it/100x750" alt=" placehold img" /> <h2 id="area2">Section 2</h2> <img src="http://placehold.it/100x750" alt=" placehold img" /> <h2 id="area3">Section 3</h2> <img src="http://placehold.it/100x750" alt=" placehold img" /> </div> </div>
CSS
#hold{ height:100%; overflow-y:hidden; } #col1, #col2{ padding-bottom:100000px; margin-bottom:-100000px; } #col1{ float:left; width:200px; } #col2{ margin-left:200px; }
What works?
The layout works fully as expected. The column height adapts to dynamic content and always remains the same height as for each other.
Problem
Anchors abort it . That is, the page scrolls to the desired anchor in the content, but everything above the anchor is hidden. I found out that this is due to overflow-y:hidden; - the page scrolls to the content and, instead of using the scroll bar, hides the above content, not just scrolls it. Disabling overflow:hidden displays all the content as expected, but this is not ideal due to the large indentation.
Others experienced the same problem with no recognized solutions that I could find .
Possible solutions
I could put together a quick height check in JavaScript and set each column accordingly, but I really want the overall JS site layout not to be free.
Some articles have recorded absolute positioning, but this will not work with dynamic content.
Change to another column height method. But ... but ... but I already have this one so far! And who are we to just insert the impossible complex coding task .. :)
Call for help
Any ideas, fellow programmers?