Dynamic Height based on Content

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I am a real php newbie, I am having to learn as I go along - no time for  
tutorials or books!

Background to my problem:
I am working on a Wordpress theme for my personal blog  
The layout is a centre column and two sidebars.

I just decided I want a fourth sidebar at the very right, floating at  
the right of the rest of the content.

The reason for the fourth sidebar is to [I]display some images for  
decoration[/I] to the right of the content.
This is done at the moment, using a 1 column table, with one picture per  

The images are set using the rand() function and an array.  They are of  
no relevance other than decoration, so I only want images to be  
displayed as long as there is content in the right sidebar which is next  
to it.

I would like the number or pictures display (img) or rows in the table  
to be dynamically set, depending on the height of the right sidebar.

i.e. something like this:
.outer_sidebar{height = $height_of rightsidebar}
I'd like for enough rows / img to be produced until the height of the  
outer sidebar is equal to the length of the right sidebar! Some kind of  
"Loop until", I guess.

At the moment, the amount of rows in the table (and images to display)  
is static.

Please would you be able to point me in the right direction for how to  
go about achieving this? It's best done using php / javascript, right?
But how?


Re: Dynamic Height based on Content

Johanna wrote:
Quoted text here. Click to load it

What you're asking is impossible.  You can't control how something looks  
in the user's browser.  All you can do is suggest the layout.

For instance, you have no idea what font size I'm using - I might have  
changed the font.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.

Site Timeline