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

Make two classes use the same code

  • # March 21, 2013 at 7:05 pm

    Sorry about the title, but this is kind of hard to explain. I’ll give it a go and if it doesn’t make sense, please leave a comment.

    I’ve got **class=’gfg-title’** that should look exactly like **class=’widget-title’**. I cannot (or don’t know how to) change their names. Is there a way to say **.gfg-subtitle = .widget-title** or something like that???

    # March 21, 2013 at 7:09 pm

    You could define them both, like so:

    .widget-title {
    /* style here */

    # March 21, 2013 at 8:27 pm

    So simple. Thanks I’ll give it a try

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.