Menu
I made a script that produces pure HTML to get a round corner effect.
get the code from the url below and please leave feedback if you find something which could be done better, im sure there is ? …
[URL=http://www.phpmyborder.com]http://www.phpmyborder.com
Its also published in the PHP community: [URL=http://phpmyborder.users.phpclasses.org/browse/package/2681.html]Phpclasses.org
now why exactly would someone want to use this, as opposed to just using images for the left and right sections?[/QUOTE]Is that a serious question?
Is that a serious question?[/QUOTE]
i think based on the amount of markup he's using to generate the borders, my images might end up being smaller in size and they cache.[/QUOTE]If you disect the markup each corner is approx 400 bytes and could be even smaller if he used a style [I]class[/I] rather than embeded CSS.
[code=html]http://bokehman.com/corner_image.png
GET /corner_image.png HTTP/1.1
Host: bokehman.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Accept: image/png,*/*;q=0.5
Accept-Language: en,es;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://bokehman.com/filename
HTTP/1.x 304 Not Modified
Date: Sat, 26 Nov 2005 16:52:22 GMT
Server: Apache/2.0.54 (Win32) mod_ssl/2.0.54 OpenSSL/0.9.7g PHP/5.0.4
Last-Modified: Tue, 22 Nov 2005 23:29:01 GMT
Etag: "1003d-50b-c4c71345"
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive[/code]
If you disect the markup each corner is approx 400 bytes and could be even smaller if he used a style [I]class[/I] rather than embeded CSS.
In the case of an image though a seperate request is needed. This causes a round trip to the server even if the image is cached just to check the image remains unchanged. Even if the image is not sent the request headers alone come to some 700 bytes as follows:[code=html]http://bokehman.com/corner_image.png
GET /corner_image.png HTTP/1.1
Host: bokehman.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8) Gecko/20051111 Firefox/1.5
Accept: image/png,*/*;q=0.5
Accept-Language: en,es;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://bokehman.com/filename
HTTP/1.x 304 Not Modified
Date: Sat, 26 Nov 2005 16:52:22 GMT
Server: Apache/2.0.54 (Win32) mod_ssl/2.0.54 OpenSSL/0.9.7g PHP/5.0.4
Last-Modified: Tue, 22 Nov 2005 23:29:01 GMT
Etag: "1003d-50b-c4c71345"
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive[/code]
In my opinion the case against this method is completely different. If one uses css to produce the curved corner the result is severely alaised, something which is much easier to control with an image.[/QUOTE]
So, are you trying to say that bandwidth is so much of an issue that it can't send a 700byte graphic without problems? I've never had an issue like that before, honestly. It may exist, but I've never run into it. Then again, I've never dealt with graphic heavy websites.[/QUOTE]Not at all. It was you that broght up the bandwith issue. That comment was in response to you saying
i think based on the amount of markup he's using to generate the borders, my images might end up being smaller in size[/QUOTE]My point is that cannot be true because the request headers alone just to get a 304 are bigger than that piece of mark-up.
But images are oh-so-much more sexy![/QUOTE]
Not at all. It was you that broght up the bandwith issue. That comment was in response to you saying[/quote]
My point is that cannot be true because the request headers alone just to get a 304 are bigger than that piece of mark-up.[/QUOTE]
i never brought up bandwidth.[/QUOTE]I guess I thought that was your slant when you posted this:
the amount of markup... my images... smaller in size[/QUOTE]Have you got a link to somewhere you have done this with images. I'd be interested to take a look at your mark-up.
Maybe in a few more years CSS3 will be implemented and actually supported by browsers, allowing us to do this much more easily.[/QUOTE]
I guess I thought that was your slant when you posted this: Have you got a link to somewhere you have done this with images. I'd be interested to take a look at your mark-up.[/QUOTE]
If you are going to get fanatical about drawing images with CSS take a look at this:[URL=http://www.designdetector.com/tips/CSSPencilsDemo.php]CSS pencils[/URL] [/QUOTE]
If you are going to get fanatical about drawing images with CSS take a look at this: CSS pencils[/quote]
wow! :eek:[/QUOTE]
Hmmm...crazy thought: what about using PHP GD library functions to create rounded-corner blocks using images created on-the-fly? [/quote]
Maybe in a few more years CSS3 will be implemented and actually supported by browsers, allowing us to do this much more easily.[/quote]I'll be grandpa the day this will happen! :p[/QUOTE]
0.1.9 — BETA 5.18