netsearchmonkey — 2010-07-21T16:14:01-04:00 — #1
I've got the following dilemma.
I have a 3 column CSS layout design. The page length is dynamic depending on how much content gets fed into each respective column. For this reason one column might be considerably longer than the other two, as a result the page length opens us white space in some columns.
Given the white space that appears if some content in columns is longer than in others, how could I measure the white space and depending on its height dynamically add in further content providing it fits (say additional side banners)?
I'm told this is possible in JS? I guess PHP is also a viable option?
Thanks a lot,
avenir — 2010-07-21T17:36:08-04:00 — #2
You could use strlen function in php.
netsearchmonkey — 2010-07-27T10:19:20-04:00 — #3
I've studied the examples shown for strlen() at the source below but can't see how I would pass the DIV of the column as a parameter?
What also strikes me is that the longest column contains more than just text in <p> <h1>, <h2>'s, for example both a vertical and horizontal accordion which dynamically grows/shrinks - determining its height purely by counting chars won't work.
Maybe there's a way to measure the container height which holds all columns? It's height will always be whatever the tallest column is plus whatever padding/margin it has in there. Right or wrong? On the other hand even if this is workable then it won't reveal how much whitespace is available in the column where the banners get displayed, given this it won't be possible to determine if there's enough whitespace to dynamically squeeze in another banner.
Anyone have any ideas?
Thanks in advance.
netsearchmonkey — 2010-07-28T16:59:20-04:00 — #4
Everyone as equally confused on this one as me?
Haven't you come across this problem when working for your clients?