RE: [PHP-DB] Stretching Graphics
| From: | Richard Allsebrook | Date: | Thu, 10 Aug 2000 14:49:01 +0000 |
| Subject: | RE: [PHP-DB] Stretching Graphics | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-1931@lists.php.net to get a copy of this message | ||
Here's one way (using a table in a table):
<TABLE>
<TR>
<TD background="left.gif" width="8"><IMG src="blank.gif"
width="8"
height="1"></TD>
<TD>
<TABLE>
<TR>
<TD>Your<BR>page<BR>content<BR>goes<BR>here</TD>
</TR>
</TABLE>
</TD>
<TD background="right.gif" width="8"><IMG src="blank.gif"
width="8"
height="1"></TD>
</TR>
</TABLE>
The resulting tables look like this:
+-+--------------+-+
| |+------------+| |
| ||Your || |
| ||page || |
|L||content ||R|
| ||goes || |
| ||here || |
| |+------------+| |
+-+--------------+-+
The two end columns (labelled L and R) have their background property set to
an appropriate image which will automatically tile vertically as many times
as required to fill in the gaps. The image can be any size you want, but I
recommend just 1 pixel high.
Another alternative if you want solid colour borders without using an image:
<TABLE>
<TR>
<TD bgcolor="#990000" width="8"><IMG src="blank.gif"
width="8"
height="1"></TD>
<TD>
<TABLE>
<TR>
<TD>Your<BR>page<BR>content<BR>goes<BR>here</TD>
</TR>
</TABLE>
</TD>
<TD bgcolor="#990000" width="8"><IMG src="blank.gif"
width="8"
height="1"></TD>
</TR>
</TABLE>
Hope this helps....
_____
~ Richard Allsebrook ~
Applications Developer and Webmaster
Easysoft Limited, No3 The Embankment, Leeds, LS1 4BJ
http://www.easysoft.com <http://www.easysoft.com>
The Home of Data Access Middleware
"A computer lets you make more mistakes faster than any invention in human
history-with the possible exceptions of handguns and tequila."
_____
-----Original Message-----
From: Adv. Systems Design [mailto:asd_2000@yahoo.com]
Sent: Thursday, August 10, 2000 3:11 PM
To: php-db@lists.php.net
Subject: [PHP-DB] Stretching Graphics
I guess my first message never made it!
I have created a webpage template that frames the
whole page content:
-----
| |
| |
----- However, it is hard to figure out how much
"page" to make (by stretching the side elements (|))
on the return of queried data. I have gotten it to
work more or less by using mysql_num_rows() to find
out how many rows were returned, and ESTIMATING and
average number of pixels needed for each
row...(multiplying that by the number of rows returned
and adding it to the image HEIGHT)
...as you can see, the "average" size for a row is not
good, because it depends on how much text there is in
the field, as well as if all 3 columns returned text
(if one column was null, the other can take more space
on the page).
The solution I have sucks, because I have to go with
the largest text field as the "average" and most of
the time the page is longer than it needs to be!
I have looked at mysql_fetch_lengths but have no idea
how it works or even if it would help...
Is there an elegant way around this or should I just
abandon my "framed" webpage? Any pointers/thoughts
appreciated...
Thanks
Luis
__________________________________________________
Do You Yahoo!?
Kick off your party with Yahoo! Invites.
http://invites.yahoo.com/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
For additional commands, e-mail: php-db-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net