Re: [PHP] PHP Manual problems

[email protected] (Robert Cummings)
Newsgroups php.general
Organization InterJinn
Message-ID <[email protected]>
Ashley Sheridan wrote:
> On Wed, 2010-02-10 at 13:25 -0500, Robert Cummings wrote:
>>
>> Michael A. Peters wrote:
>> > Bob McConnell wrote:
>> > 
>> >> Our SOP is to generate standards compliant pages, validate them with
>> >> Firefox and the HTML Validator add-on, then deal with the deviant
>> >> browsers. It's a lot less work than trying to do it the other way
>> >> around. There are a few minor issues, such as W3C still refusing to
>> >> allow the autocomplete attribute for forms, while PCI requires it. But
>> >> those are few and far between.
>> > 
>> > Go HTML 5.
>> > It doesn't work with the validator plugin but it validates at W3C.
>> > 
>> > And while going HTML 5, start migrating to HTML 5 layout.
>> > 
>> > IE
>> > 
>> > <div id="aside">
>> > <aside>
>> > // stuff
>> > </aside>
>> > </div>
>> > 
>> > Most browsers do not recognize the HTML 5 layout tags yet, so you have 
>> > to wrap them in a div and attach the style to the div, but as browsers 
>> > start adopting HTML 5 your content will work with context features even 
>> > while still wrapped in the div tags.
>> > 
>> > It is particularly useful for article and section, where the depth of a 
>> > section within an article can be helpful for non visual browsers.
>>
>> Just a word of thought... if you're doing styling... use classes and not 
>> IDs. Use of IDs for styling is very often indicative of inexperience, 
>> inability, or lack of understanding with respect to CSS.
>>
>> Cheers,
>> Rob.
>> -- 
>> http://www.interjinn.com
>> Application and Templating Framework for PHP
>>
> 
> It would depend I think. I use ID's when I know that the element I'm 
> giving it to will be the only one on the page. Such as the header, main 
> navbar, footer, etc.
> 
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk

Agreed. Those make sense to demarcate the structure layout of the 
document... but still, for styling the class makes more sense since it 
keeps the specificity low and easy to override (especially true for 
skinnable apps). In my experience I've seen quite often things like:

<div id="header_wrapper">
     <div id="header">
         <div id="left">LOGO</div>
     </div>
</div>

And then of course I'll see later:

<div id="footer_wrapper">
     <div id="footer">
         <div id="left">COPYRIGHT</div>
     </div>
</div>

And in the specific example I responded to the example was:

<div id="aside">
     <aside>
         // stuff
     </aside>
</div>

This seemed like a classic example of ID abuse.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP
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.