macromedia.dynamic.html
[Top] [All Lists]

Re: CSS Class versus ID for PHP/MySQL

Subject: Re: CSS Class versus ID for PHP/MySQL
From: Michael Fesser <netizen@xxxxxx>
Date: Mon, 21 Jul 2008 14:07:51 +0200
Newsgroups: macromedia.dynamic.html

.oO(tomwood2)

>I'm building some template pages for a website that will eventually be 
>populated mostly via PHP/MySQL. The most complex web pages have about ten 
><div> 
>definitions and three or four text styles. All of the DIVs are unique and 
>happen once on the page. Some of the text styles may happen more than once to 
>style the text of items in an ordered list. 
>
> Conventional wisdom says use ID for those DIVs, and Class for those text 
>styles. But then I've run across comments that diss ID and say go with Class 
>alone. I'll be delivering these templates to a programming specialist to set 
>up 
>the PHP/MySQL and I'd like to save their time (and my money) by getting these 
>templates as close to right as possible. 
>
> How should I set these pages up in terms of Class or ID selectors to make the 
>database programmer's job as easy as possible?

Whether you use classes or IDs has absolutely nothing to do with the
server-side language. It may only be an issue if there's also some
client-side scripting, which might require IDs to access particular
elements.

Micha

<Prev in Thread] Current Thread [Next in Thread>