Re: [PHP] Quotes vs. Single Quote

[email protected] (tedd)
Newsgroups php.general
Message-ID <p06240805c881c42e40fa@[192.168.1.104]>
At 9:09 AM -0400 8/6/10, Andrew Ballard wrote:
>On Fri, Aug 6, 2010 at 8:31 AM, tedd <[email protected]> wrote:
>>  While it may not be obvious, the statement:
>>
>  > <table border="1">
>>
>>  is flawed (IMO).
>>
>>  The "best" way to handle this is to define a class (or id) for the table in
>>  a css file and then set the border (i.e., styling) to whatever you want. For
>>  example, your HTML would look like:
>>
>>  <table class="my_table">
>>
>>  And your CSS would contain:
>>
>>  .my_table
>>    {
>>    border: 1px solid black;
>>    }
>>
>
>I more or less agree with you, but sometimes it's technically a little
>more difficult than that.
>
>-snip-
>
>As is often the case with CSS, that's a good bit more text to
>accomplish the same effect as an older, smaller attribute.  :-)
>
>Andrew

Andrew:

The problem you cite is well said and your point is well taken.

However, the main point I am making is to move this problem totally 
out of the HTML/PHP arena and place it where it belongs, which is 
inside CSS -- after it *is* a presentation problem.

IMO, it is *far* better to deal with browser comparability problems 
from one CSS file than it is to sort through all your PHP files 
looking for the phrase <table border="1">. From my experience, when 
you have a problem, it is always better to give it a name and deal 
with it from one location.

As for "older, smaller attributes", they are only getting older and 
their importance lessens with time (I can relate.) :-)

Cheers,

tedd

-- 
-------
http://sperling.com  http://ancientstones.com  http://earthstones.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.