Re: Package(s) proposal(s): HTML_Image and HTML_Link.
| From: | Davey | Date: | Sun, 03 Aug 2003 17:44:50 +0000 |
| Subject: | Re: Package(s) proposal(s): HTML_Image and HTML_Link. | ||
| References: | 1 2 3 4 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-19191@lists.php.net to get a copy of this message | ||
Christian Stocker wrote:
On 8/3/03 6:35 PM, Leandro Lucarella wrote:Width and Height are only to specified when overriding the images actual height, and I'm pretty sure are no longer valid in XHTML as they are deprecated in favour of CSS. <spec>Stephan Schmidt, el domingo 3 de agosto a las 10:38 me escribiste:Not true. You should always specify width and height. With this information, the browser can already render the correctly even before he loaded the picture and know it size.. Furthermore, if you turned off the picture loading, the width and height attributes are even more useful ;) chreguHi,I thought that, but it has no sense in doing that. The image has it own size. Seting the size is only useful when you want a different size.Just a wrapper arround <IMG>. When using HTML_Page, HTML_Table and HTML_Xxx objects, I found annoying to write HTML directly, that's why I've done HTML_Image.I think, you should include some more features, I could think at least of these: - The class should be able to get the image size and add it too the attributes.
height %Length; #IMPLIED -- override height -- width %Length; #IMPLIED -- override width --</spec> Consider using in-line CSS to set the width/height, <img style="width: 100px; height: 50px;" src="foo.jpg" /> will still give you the benefits you mentioned above (these are simply benefits, not required of the UA by the spec). - Davey [1] http://www.w3.org/TR/html4/struct/objects.html#edef-IMG