Forums

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

Home Forums CSS Nth child puesdo class I think right?

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #195408
    NikeAirforce1s
    Participant

    http://codepen.io/waggawagga/pen/vEpYOz

    Give a CSS selector that selects only the advertisement elements that appear after the
    heading, so that the very first advertisement is ignored.

    Say what? What are they asking for please, does anyone understand?

    Also something a lil different, if you’re asked to make the first paragraph of a bunch of paragraph 50% larger.
    so
    http://codepen.io/waggawagga/pen/PwEoZg

    In this case do I use first of type? I can’t use nth-child to target just one right and definitely can’t be the first child since that will be the h1. I’ve never even used first of type before just read about it.

    Help pls.

    #195413
    Paulie_D
    Member

    Give a CSS selector that selects only the advertisement elements that appear after the
    heading, so that the very first advertisement is ignored.

    h1 ~ .advertisement {
      background: #f00;
    }
    

    but that’s just one way

    Also something a lil different, if you’re asked to make the first paragraph of a bunch of paragraph 50% larger.

    p:first-of-type {
    color:red;
    }
    

    http://codepen.io/Paulie-D/pen/KwZKyg

    #195424
    NikeAirforce1s
    Participant

    Paulie the life saver…thanks, but I don’t see your first paragraph as 50 percent bigger.

    #195444
    Paulie_D
    Member

    I don’t see your first paragraph as 50 percent bigger.

    It isn’t…I’m just showing you how to select it.

    What ‘50% bigger’ actually means is a little unclear…50% taller, 50% larger font?

    Anyway, the way I showed is just one way.

    http://code.tutsplus.com/tutorials/the-30-css-selectors-you-must-memorize–net-16048

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