Forum Moderators: not2easy

Message Too Old, No Replies

Are empty Classes & ID's bad?

         

mossimo

6:15 am on Nov 10, 2003 (gmt 0)

10+ Year Member



I am developing sets of library’s to format html based of database records and I am using css heavily. My question is there any reason why it would be bad to have the final html output contain named .Classes and #ID’s that are not defined anywhere or just empty.

For example:

#IDNotUsed {/*width: 50px;*/} or .NullClass{}

All browsers should just skip over then I would think? But I could be wrong.
What do you think? Thanks.

cjwsb

2:04 pm on Nov 10, 2003 (gmt 0)

10+ Year Member



The browsers should skip over them, but if they're empty or undefined, just comment 'em out and uncomment for later use.

Chris

mossimo

3:52 am on Nov 14, 2003 (gmt 0)

10+ Year Member



undefined is a scary word.

Yes the browser should? skip over them but keep in mind this is html render from asp.
I can't know what the user will query from the database so depending on the results there may/will be in-line and block level styles that wll not have any attributes defined for them.

Judging from the lack of response from this post I will assume I’m Paranoid and this is not an issue.

Good Day

Reflection

5:42 pm on Nov 14, 2003 (gmt 0)

10+ Year Member



If you mean having an id or a class that isnt defined in your css you wont encounter any problems. If you mean having a class or id decleration, in your html, without a name(ex: class="") you wont have any problems other than with validation.