Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Grouping Selectors Help

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #36850
    Andy Howells
    Participant

    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?

    #97490
    wolfcry911
    Participant
    .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)
  • The forum ‘CSS’ is closed to new topics and replies.