Grow your CSS skills. Land your dream job.

css snippet explanation

  • # December 22, 2012 at 4:10 pm

    h1, pre > b, #p > i
    {
    background: #FFFF99;
    box-shadow: 0 0 2px 2px #FFFF99;
    }

    #A > h1, #A > pre > b, #A > #p > i
    {
    background: #33CCFF;
    box-shadow: 0 0 2px 2px #33CCFF;
    }

    I understand the background and box shadow parts, but the header part with the > symbols is still confusing to me…

    I know what the < h1 > < pre > < b > and < i > tags are…and the #p is all element IDs that equal “p”…can someone please offer their opinion on what’s happening in these two css blocks with the header parts?

    Thanks

    # December 22, 2012 at 6:20 pm

    The > means the immediate children.

    This [Codepen](http://codepen.io/stevencrader/pen/tmokx “Pen”) has an example.

    # December 22, 2012 at 10:26 pm

    Thank you Steven

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".