Forum Moderators: not2easy
Question 1:
As a basic standard which way would you go.
given that we have elements
#mydiv
p
to provide a specific style for p tags in #mydiv would you
a)
set up a class p.mydiv
b
define #mydiv p
and why?
#mydiv p
That covers every paragraph within #mydiv, without requiring an additional class to be added to them in the HTML - and adding paragraphs is likely a common occurrence. Assuming you want the CSS to affect every paragraph, I'd consider that reason enough. IMO the other way creates un-needed classes.
yes, kinda, but in that case i would seriously consider using something like blockquote or another suitable tag rather than a paragraph class, it is highly likely that it would be symantically corrrect too.