|
Posted by Confused but working on it on 09/16/07 05:45
On 2007-09-14 19:30:34 -0700, "Rik Wasmus" <luiheidsgoeroe@hotmail.com> said:
>>>>
>>>> echo "<img src='images/$file' class=\"pad1em\">";
>
> Hmm, are you sure about the class name? I'd say that on a new layout wit h
> the same HTML 'pad1em' could end up making very little sense. A golden
> rule of css is that a classname should reflect what something is, not ho w
> it is _displayed. A more suitable name could be something like
> 'imagepreview' or the like.
>
>>
>
> Oh yeah.
> (Just make sure the file is a proper image directly after an upload.
> Examining extention or mime-type is no good. I'm quite happy to us
> getimagesize() for this purpose, as it would return false if it couldn't
> interpret a file as an image.)
>
> And to display only files _ending_ in jp(e)g, I'd use
> preg_match('/\.jpe?g$/i',$string);
> --
> Rik Wasmus
Rik,
Thanks for responding. In this case the class name is what it is.
..pad1em{padding: 1em;}
Was just messing with some spacing and will rename if I add some pretty
decorations. Any suggestions for this class?
thx..ron
Navigation:
[Reply to this message]
|