Filtering block elements into two columns

payork

New Member
What I'm asking is probably impossible, but still.Given a series of block elements, like this:\[code\]<p>...</p><p>...</p><p>...</p><p>...</p><div class="toc">...</div><p>...</p><img class="pic">...</img><p>...</p><img class="pic">...</img>\[/code\]We want all the .toc and .pic elements to line up in one column at the left, and all the other elements to be in a column to the right. The tops of the first \[code\]p\[/code\] and the top of the first \[code\]div\[/code\] should be level. The \[code\]img\[/code\] should retain their original vertical position. There should be no space left where the \[code\]div\[/code\] and \[code\]img\[/code\] were originally.Most of this seems to be achievable by setting the \[code\]img\[/code\] to \[code\]position:relative; left: -100px\[/code\] (etc), and the \[code\]div.toc\[/code\] to \[code\]position:absolute\[/code\]. Here's the problem: The \[code\]img\[/code\] may overlap with the bottom of the \[code\]div.toc\[/code\]. Any solutions? Workarounds?
 
Back
Top