Select id and class at the same time

Hi there,

I am trying to add some styles to the following

  • by selecting the id “cate-1” and class of “active”

    [code]



    • item
    [/code]

    I’ve tried the following, but it doesn’t work:

    
    li#cate-1[class='active']{marging-left: -2px;}
  • Do it this way:
    li#cate-1, .active { margin-left: -2px; }

    li#cate-1.active {} ?

    Hi there toolman,

    why can’t you use one of the following options?

    option 1

    #cate-1 {
        margin-left: -2px;
     }

    option 2

    .tabs-cat li:first-child {
        margin-left: -2px;
     }

    Also note the normal spelling of margin :mask:

    coothead

    1 Like

    This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.