No group selection of CSS selters



  • There's a set of classes describing the columns of the different width:

    .c-1 {width: 8.33%;}
    .c-2 {width: 16.66%;}
    .c-3 {width: 25%;}
    .c-4 {width: 33.33%;}
    .c-5 {width: 41.66%;}
    .c-6 {width: 50%;}
    .c-7 {width: 58.33%;}
    .c-8 {width: 66.66%;}
    .c-9 {width: 75%;}
    .c-10 {width: 83.33%;}
    .c-11 {width: 91.66%;}
    .c-12 {width: 100%;}
    

    I'd like to do group change with them. But it's complicated. This type of code works:

    [class*="c-"] {
    padding: 0em;
    float: left;
    display: block;
    }
    

    But it's a code that chains everything. с-e.g., unrelated class .sec-txt

    That's the code. [class|="c-"] or [class^="c-"] - not working.

    Has anyone encountered such a problem and how to treat her?



  • Write two seculars:

    [class^="c-"],
    [class*=" c-"] {
        padding: 0em;
        float: left;
        display: block;
    }
    

Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2