Posts: 387
Name: Randy
Location: Northern Wisconsin
|
Some people just like to remind themselves that ID is for a div. In most cases, "header" will be a div. Also, ID's cannot be duplicated on the same page, therefore, there is no advantage(as far as I know) to target it with adding "div".
These are also identical and both are browser compatable:
p#first-paragraph { }
#first-paragraph { }
If it were a general "class"(not ID), I'd probably target it more specifically such as:
span.text-shadow { }
rather than
.text-shadow { }
Only because you might have a slightly different styling for a paragraph that uses text-shadow(for example) that you wouldn't want to inherit stying from the span.text-shadow.
Last edited by racer x; 08-07-2010 at 10:29 PM..
|