0

enter image description here

The green area, is the area which I can edit and modify in the CMS system, but the red part is out of my control. I want to change some of the flex elements in the class that is circled in blue.

Is there anyway to select a parent starting from the class .edit-upper-div ? Like there is to select a child element using <

Lucas
  • 135
  • 6
  • 1
    Cant you just pick the class you want to edit, no matter where it is, redeclare it, and rewrite anything you need using !important ? – Dave111 Jan 11 '23 at 11:07
  • If you can edit the style tag contents then you can style any part of the DOM including the elements in red. Also have a look at the :has pseudo class. https://stackoverflow.com/questions/27982922/latest-on-css-parent-selector – Adam Jan 11 '23 at 11:33
  • Look into the `has()` pseudo code. – Gerard Jan 11 '23 at 11:43
  • @Dave111 The issue is the class that I would redeclare comes up multiple times in the page. And I only want this exact one edited – Lucas Jan 11 '23 at 13:52

1 Answers1

0

you can use:

ul:has(.edit-upper-div) {
  // do your styling here....
}
Muhammad Zakaria
  • 1,269
  • 6
  • 14