Give help. Get help.

  • # February 25, 2012 at 7:53 pm

    Hi all,

    I’m trying to group selectors while simultaneously using an adjacent selector, I.E;

    .divname p + h1, h2, h3, h4, h5 {}

    It works but it’s also causing a bleed into the rest of the page for other header tags that should not have these styles so I’m assuming this isn’t the right method.

    Anyone got any tips?

    # February 25, 2012 at 8:44 pm
    .divname p + h1, h2, h3, h4, h5 {}

    is very different than

    .divname p + h1, .divname p + h2, .divname p + h3, .divname p + h4, .divname p + h5 {}

    In other words, you can’t comma deliminate siblings used with the adjacent sibling combinator

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

You must be logged in to reply to this topic.