*

Lucky

  • ***
  • 65 posts
I want to hide the 'cityArea' input field in the user's 'My profile' admin page but it leaves me with an empty <div></div>-tag which pushes the following fields down.

So does anyone know how to hide the surrounding <div></div>-tag that doesn't have a specific id or class?

The html is:

<div class="row">
  <label for="cityArea">Stadsgebied</label>
  <div class="input-box"><input id="cityArea" type="text" name="cityArea" value="" placeholder=""></div>
</div>

My css is currently:

label[for="cityArea"],
input#cityArea {
  display: none !important;
}

Marked as best answer by Lucky on September 16, 2025, 02:28:22 PM
*

MB Themes

Re: How to hide a surrounding container without specific id or class?
« Reply #1 on: August 27, 2025, 08:36:58 AM »
Solution with has operator might work
Code: [Select]
.row:has( > .input-box #cityArea) {display:none;}
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots