So this might be an odd question. But I tried to hide a certain HTML element on the bbc.com website with using element.style.display = 'none !important'
in my Google Chrome Console. Strangely it does not hide the element as I would expect it.
Maybe it is something minor and I am just overseeing something.
Here is the code I use:
var overlay = document.querySelector("div[class='fc-dialog-overlay']");
overlay.style.display = 'none !important';
I do not get an error and if I inspect the element it also contains the new property and looks like <div class="fc-dialog-overlay" style="display: none;"></div>
, but it can still be seen.
The same problem occurs with several other elements like the class='fc-consent-root'
.