Re: Re: PHP programming strategy
| From: | Ashley Sheridan | Date: | Sat, 08 Aug 2009 12:26:51 +0000 |
| Subject: | Re: Re: PHP programming strategy | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-296467@lists.php.net to get a copy of this message | ||
On Sat, 2009-08-08 at 07:53 -0400, tedd wrote:
> At 6:32 AM +0100 8/7/09, Ashley Sheridan wrote:
> >
> > > <table class="pfm">
> >> <tr>
> >> <td>
> >> <img src="Images/Nxxxxx.jpg" width="210"
> >> height="300">
> >> <p class="nrmltextn">Yanni Nxxxxx </p>
> >> <p class="notetextn">Sally Riordan Scholarship, 2007-
> >> </p>
> >> </td>
> >> </tr>
> >> </table>
> >>
> >> (And the thing that really astounds me about CSS is that they
> >>never thought of putting in
> >> constants. Instead of being able to specify a set of colours, and
> >>then simply quote them
> >> in the CSS whenever they are needed, I have to specify them in
> >>PHP, and then encode them
> >> into the CSS every time I use them, which is a real pain in the
> >>XXXX. The total lack of
> >> diagnostics is another real pain.)
> >>
> >>
> >Well, your above example would just become:
> >
> ><div class="pfm">
> > <img src="Images/Nxxxxx.jpg" width="210"
> > height="300">
> > <p class="nrmltextn">Yanni Nxxxxx </p>
> > <p class="notetextn">Sally Riordan Scholarship, 2007- </p>
> ></div>
>
> Ash:
>
> You don't need the width="210" height="300". For example, this works:
>
> <div class="pfm">
> <img src="Images/Nxxxxx.jpg">
> <p class="nrmltextn">Yanni Nxxxxx </p>
> <p class="notetextn">Sally Riordan Scholarship, 2007- </p>
> </div>
>
> Also, if you use first-child, it could be taken down to:
>
> <div class="pfm">
> <img src="Images/Nxxxxx.jpg">
> <p>Yanni Nxxxxx </p>
> <p>Sally Riordan Scholarship, 2007- </p>
> </div>
>
> Cheers,
>
> tedd
> --
> -------
> http://sperling.com
> http://ancientstones.com
> http://earthstones.com
>
FirstChild isn't as widely supported yet (IE again :( ), so I'm still
not using it, but yes, I could have got rid of the dimension attributes
too!
To Clancy, it was only a guess that put your title with the image. The
alt attribute is used to ensure that the text label is implicitly
associated with your image. What if your image was actually replacing
text as a stylised heading? Without the alt attribute, there is no way
to determine what the image is for.
Thanks,
Ash
http://www.ashleysheridan.co.uk