Treehouse: Grow your CSS skills. Land your dream job.

HTML/CSS: Choosing semantic naming conventions

  • # November 18, 2012 at 7:57 pm

    @andy_unleash That just means you have to be smart about how you write your CSS, which is a good thing. Also, there is nothing wrong for using classes for something that doesn’t repeat.

    # November 18, 2012 at 8:50 pm

    True, but on occasion I use an ID to explain & describe the content of a container, but very very rarely use them for styling purposes.

    Usually it’s just like div#main-content and div#sub-content

    Within those I commonly have a sprinkling of classes, but in my CSS I don’t have them nested.

    # November 18, 2012 at 9:10 pm

    @andy_unleash Perhaps using a comment might work just as well? At least that way you avoid the confusion of having an ID that isn’t being used for anything.

Viewing 3 posts - 16 through 18 (of 18 total)

You must be logged in to reply to this topic.