Re: Stretching Graphics
| From: | joe at jWebMedia dot com | Date: | Thu, 10 Aug 2000 15:09:45 +0000 |
| Subject: | Re: Stretching Graphics | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-1934@lists.php.net to get a copy of this message | ||
I have to put in my two cents on this - Richard recommended to make your background 1 pixel
high. I would recommend the opposite. make it 5 or 10 pixels - Macs, browsers, and 1 pixel
background images do not mix. The browser insists on drawing the background 1 pixel at a
time. It makes the page take FOREVER to load, and if you want to scroll, you're screwed.
Whenever you scroll, it has to redraw the whole background, 1 pixel at a time again. Making
the image 5 or 10 pixels tall completely gets rid of this strange problem and really won't
increase the amount of load time. In fact, for any Mac user, it will lower the load time.
If you need just a solid color, you are best using a TD BGCOLOR, as Richard suggested. Good
Luck,
Joe
Richard Allsebrook wrote:
> 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
>
> --
> 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