View Full Version : CSS div ID attribute question

02-13-2005, 08:13 AM
Okay.. let's say I have something like:

#idname { font-family:tahoma; color:#FFF }
#idname a:link { color:#000 }

Am I required to put font-family in the second line as well, or would it apply it to both (which I want)?

02-13-2005, 08:33 AM
all child elements inherit the settings from their parents. so yes, the font should apply to all elements within the parent.

02-13-2005, 06:20 PM
What he said :) The only exceptions are occasionally you will have to redeclare font settings if you are styling a table within a div.

02-13-2005, 08:56 PM
Ah, I see. Thanks for clearing that up.