Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Chrome not displaying div

I have a site which uses the Bootstrap framework.
Unfortunately some of the classes of divs do not display in Chrome (only) & I can't figure out why.

Bootstrap sits on another PHP framework - I did not create this original code; but I can modify it easily enough.
The hidden divs are being rendered in the DOM (I can inspect them).
I've searched all references to the hidden div class (col-ad) & they all come up as nice & mundane CSS with no obvious things that could make the div hidden. No javascript references either.

If I rename the class (eg. Xcol-ad) in the DOM the div displays.

When I inspect the div I get the following:

enter image description here

Which is the only thing I can find which could be the culprit. Unfortunately I can't find a reference to this within any of my code.

Have tried modifying the DOM (display:block!important) without success.

When I click on the <style> tags it (I think) points to something called #shadow-root(open) at which point I'm lost. I've searched for info about this but haven't been successful (I'm not 100% sure this is even the problem) - have changed a setting within Chrome (Show user agent shadow DOM) without success.

It feels like my styling has been taken over somewhere & I don't know where.

EDIT: link to demo site where I got script - just tried looking at site with browsershots tool & ads appear even with Chrome, so may be my version(?)

like image 630
boomshanka Avatar asked Sep 25 '22 11:09

boomshanka


1 Answers

That is clearly some kind of ad blocker extension, that inserts its own style rules to block/hide elements – look at the identifiers used in that selector, should be pretty obvious.

Edit: [further explanation, from comment]

The selector contains “ad” in all imaginable combinations, plus “advertisement”, “banner”, “sponsor” showing up as well. That is a typical kind of “kill ’em all (at least the most obvious ones)” attempt by an ad blocker – and that often leads to collateral damage.

You can also see .ads_320_100 there, which is targeting a specific, typical banner size; some blockers even remove all images that have that kind of “dimensions” specified in their name, for certain “ad-typical” image sizes. (Even though it makes server-side management of different image sizes easier, I’d recommend to stay away from such naming schemes – for this exact reason.)

like image 174
CBroe Avatar answered Oct 11 '22 10:10

CBroe