Forums

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

Home Forums CSS Advanced CSS Selector

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #42621
    idesignstuff
    Participant

    Hello all,
    I was watching Episode #115 “Don’t Overthink it Grids” and around the 15 minute mark Chris uses a selector:

    [class*=’col-‘]

    He also uses this selector to adjust padding. This is not in the video but in the article

    $pad

    He uses this to taget everything that contains class col-. My question is what are these types of selector called? and more importantly where can I learn more about them? I’ve done some searches on the internet and can’t seem to find any articles related them.

    Thanks a million for helping out an aspiring Front End Developer

    Cheers

    #123991
    Paulie_D
    Member
    #123992
    idesignstuff
    Participant

    Thank you that is exactly what I was looking for! Thank you very much.

    I tried using the [class*=’col-‘] selector in a gird framework but am having trouble getting it to work. Am I making a mistake in the code?

    http://cdpn.io/vpcIb

    #123998
    Kitty Giraudel
    Participant

    Yes. You used div[class*='.col-'] { ... } instead of div[class*='col-'] .

    Edit: I think it worth pointing out that attribute selectors can be pretty heavy even if they can be handy.

    #124001
    idesignstuff
    Participant

    Thank you so much! That was driving me crazy, I didn’t notice I had the period in front of col.

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