At 9:09 AM -0400 8/6/10, Andrew Ballard wrote:
On Fri, Aug 6, 2010 at 8:31 AM, tedd <> 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:

   border: 1px solid black;

I more or less agree with you, but sometimes it's technically a little
more difficult than that.


As is often the case with CSS, that's a good bit more text to
accomplish the same effect as an older, smaller attribute.  :-)



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.) :-)




PHP General Mailing List (
To unsubscribe, visit:

Reply via email to