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:
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(?)
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.)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With