Forums

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

Home Forums CSS what is the meaning of this line in the css

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #42100
    sumitweb
    Participant

    Hi
    what is the meaning of this line in css

    .btn-group > .btn-mini

    #121465
    SgtLegend
    Member

    That is a child selector, it will only select the next element it finds with a class of `.btn-mini`.

    http://www.w3.org/TR/CSS2/selector.html#child-selectors

    #121467
    sumitweb
    Participant

    thanks man

    #121470
    Kitty Giraudel
    Participant

    No, it doesn’t.

    It means it will target any element with the .btn-mini class which is directly descendant of any element with the .btn-group class.

    This means the p tag will match but not the span since it’s not a direct child of .btn-group.

    div class=”btn-group”
    p class=”btn-mini”
    span class=”btn-mini”
    /span
    /p
    /div

    #121675
    Chris Coyier
    Keymaster

    You can learn a little bit more about it here too: https://css-tricks.com/child-and-sibling-selectors/

    #122538
    sumitweb
    Participant

    Thank you all

Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘CSS’ is closed to new topics and replies.