Re: Re: PHP programming strategy

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux