Calculating Cell Height
| From: | Ashley M. Kirchner | Date: | Wed, 17 Oct 2001 18:45:42 +0000 |
| Subject: | Calculating Cell Height | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-71377@lists.php.net to get a copy of this message | ||
[ this will be long, and has probably more to do with HTML, however
since I'm coding this in PHP, I figured I'd ask here ]
Here's a brief run down of what I'm trying to find out whether
it's doable or not:
I need to figure out a rough number that will represent a (table)
cell height, based on the amount of content that's in it. The site
design is made in such a way that there are several table cells for
several things. One of those cells, the largest one, will be filled
with (dynamic) content, however the length of the data will affect how
the design flows. A visual representation of what I'm faced with is
this:
+--------------+-------------------------+-+
| graphic | graphic | | <-- fixed height pixel
+--------------+-------------------------+-+
| | | |
| graphic | content | | <-- fixed height pixel
| | cell | |
+--------------+ |-+
| | | |
| graphic | | |
|(top aligned) | | | <-- variable height pixel
| | | |
| | | |
+--------------+-------------------------+-+
As long as the "content cell" is a specific height (or less), the
three graphics to the left are okay. However, as soon as the content
height gets too large, those three graphics on the left start to show
blank spaces between them as their cells also get stretched.
To "fix" that problems, I created that third column you see, which
has a 1 x <whatever height> pixel in it with the top two being fixed,
and the bottom one being variable height. And right now, that variable
height is being determined by me, visually. When I see a page getting
too long, and it breaks the graphics, I increase the height of that
pixel, so that it pushes the other two cells back up. This works
great. My problem is, the dynamic content that will be changing every
time.
I want to switch to a template mode where I don't have to create a
zillion different pages for everything, but rather have one template per
section where the content gets pulled in. But, I need a way to figure
out how to adjust that one "variable pixel" based on the content.
See? I told you this was going to be long. Suggestions are welcome
- including those suggesting a different list all together.
--
W | I haven't lost my mind; it's backed up on tape somewhere.
+--------------------------------------------------------------------
Ashley M. Kirchner <mailto:ashley@pcraft.com> .
303.442.6410 x130
IT Director / SysAdmin / WebSmith . 800.441.3873 x130
Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6
http://www.pcraft.com ..... . . . Boulder, CO 80303,
U.S.A.