0

Hi all I modify my select2 with this code

.select2-selection {
  height: 200px!important;
}

however I do not want to modify select2 that are inside my datatable plugin. From inspecting the element I notice that the select2 in datatable was under the th span span select2-selection .

So I tired this code to change all select2 height that are not in tr tag but it is still changing the height of the select2 in the datatable.

How do I make it only change the height that are not in a table? Much help would be appreciated

:not(th) > .select2-selection {
  height: 100px!important;
}

also tried

  :not(th) .select2-selection {
      height: 100px!important;
    }
dragonn
  • 311
  • 5
  • 20
  • 1
    Does this answer your question? [CSS selector for something not inside something else](https://stackoverflow.com/questions/31268382/css-selector-for-something-not-inside-something-else) – Heretic Monkey Jul 13 '21 at 17:27
  • Hi yeah I read that (check edits the guy did what I did) but it still did not work. Maybe it's cause select2 or something – dragonn Jul 13 '21 at 17:32
  • The accepted answer to that question is, essentially, "there is no way of doing that", so I'm not sure what you're talking about. – Heretic Monkey Jul 13 '21 at 18:45

0 Answers0