473,322 Members | 1,911 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Dynamic Height based on Content

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
-http://www.vikingprincess.net
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 display some images for
decoration
to the right of the content.
This is done at the moment, using a 1 column table, with one picture per
row.

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.

Problem:
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?

Best
Jo
Nov 26 '06 #1
1 1313
Johanna wrote:
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
-http://www.vikingprincess.net
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 display some images for
decoration
to the right of the content.
This is done at the moment, using a 1 column table, with one picture per
row.

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.

Problem:
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?

Best
Jo
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.
js*******@attglobal.net
==================
Nov 26 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: K | last post by:
I have found a script online that I want to use (I am new to PHP). It creates dynamic images based on the text that you pass it. However, no matter how I try, I can't get anything other than a...
1
by: Devon | last post by:
Hi All, I'm generating a pdf document using FOP .25 from Apache. I've created running dynamic headings (e.g. chapter titles) that change as dictated by the XML source I'm converting to PDF. Now...
1
by: Peter | last post by:
Hi, Does anyone know of how I could dynamically resize an iframe based on the content's height (for IE) so that no scrollbar appears for the iframe? The content will be from a different domain....
2
by: Steve Bottoms | last post by:
Hi, all! Using VB as code-behind in asp.net page... I have a TABLE control which I'm building dynamically. After the table is built, I'm trying to retrieve the HEIGHT property of that table...
1
by: nsvmani | last post by:
Hi, i am trying to get the FileOpen dialogue window as soon as clicked href link I am using IE6 with ActiveX enabled. Just need to get the File Open dialogue window when i click on the HREF links.It...
21
by: karen987 | last post by:
I have a news website, with asp pages. It has publishing software which allows you to add articles in a database, and then calls them up from links etc. I have added dynamic meta tags in 2 parts. The...
19
by: Rabel | last post by:
I have a page that is using tables (please no comments about this - I understand it should be css but firefox created this template) I have a menu down the left side and the bottom is supposed to...
5
by: empiresolutions | last post by:
I'm trying to build a box that i can place content in. This box should dynamically change width and height to accommodate the content inside. I have build out a non-working example here...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.