On 23/05/2006, at 8:55 PM, Designer wrote:
I've noticed before that Mr Meyer quite often uses stuff like:
[1] div#links a:hover img {position: absolute; etc.
whereas I would just say :
[2] #links a:hover img {position: absolute; etc.
Given that Eric Mayer is one smart guy, and I am not ( :-) ), I
find myself being intrigued as to why he does this. Is there a
reason? Does the preceding 'div' actually do anything, or is it
simply saying that it's the id of a div, as opposed to an id of
something other than a div???
Basically, this is making the rule more specific - less likely
to be over-ridden by another rule, and less likely to disrupt
other styles already in place.
You might want to use that id for a div on one page and
a form on another - this would allow you to be flexible.
It can also be a helpful reminder of what the style is intended
for. That's my reasoning anyway.
Mathew
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************