«« Next » « Previous
«« Next » « Previous

Link Details

That link needs one more vote. Make it yours! Login and vote now.
Link 88520 thumbnail

By mswatcher
via weblogs.asp.net
Published: Jun 19 2008 / 17:52

I previously wrote about taking CSS beyond a simple style library by writing HTML that’s easy to style. I’d like to go into one point in a bit more detail – avoiding class explosion by leveraging descendant selectors: You might think that really stylable HTML needs classes all over the place. That's not true, thanks to descendant selectors, which let you target elements inside a parent element. For instance, descendant selectors will let you style all > elements which appear inside a > with and id of "nav":
  • 12
  • 0
  • 981
  • 277

Comments

Add your comment
User 217678 avatar

mostlyharmless replied ago:

1 votes Vote down Vote up Reply

Nice, except set the id rather than a class.

Add your comment


Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.