• Resolved Sujal Jain

    (@sujaljain007)


    Just for reference, i am using custom css classes defined in general settings under block class name. But, I don’t use any default wrappings (following the naming conventions though like lazysense-3 for 3rd ad unit) because I need to add custom classes such as ‘alignwide’ to the ad units. So, does this line affect me? As I might use client-side detection.

    Please note that many client-side functions like tracking, client-side device detection, client-side GEO targeting can’t work without a wrapping div.

    https://adinserter.pro/documentation/alignments-and-styles
    <div class="lazysense lazysense-3 alignwide">
    <ins class="adsbygoogle"
         style="display:block; text-align:center;"
         data-ad-layout="in-article"
         data-ad-format="fluid"
         data-ad-client="ca-pub-xxxxxxxxxxxxxxx"
         data-ad-slot="xxxxxxxxx"></ins>
    <script>
         (adsbygoogle = window.adsbygoogle || []).push({});
    </script>
    </div>

    But coming to the main issue for this thread -> As it can be seen I’ve not added any inline-styles here or any other ad unit not mentioned here. But all of them have some inline-styles like height:auto!important;

    This code in particular appears at the start of the post and only it has more custom inline styles bothering me: width:100%;height:auto;

    I tried to change the wrapping div to:

    <div class="lazysense lazysense-3 alignwide" style>
    <div class="lazysense lazysense-3 alignwide" style="">
    <div class="lazysense lazysense-3 alignwide" style="width:unset;">

    But all of them serve no difference. The inline styles are immutable and I don’t know where they come from. I guess because they are inline, they are not added by any other plugin or theme or any javascript code.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Sujal Jain

    (@sujaljain007)

    Addition:

    Upon further inspection, I see that the inline styles only add when the user agent is a mobile phone, doesn’t bother if a desktop or a tablet.

    I also see a small delay in the loading of these inline styles so I might have come to a conclusion that these are loaded somewhere in the client-side javascript from the plugin.

    But, I don’t know how or if there’s a way to change this behavior. I have this page on phone that is full width and written content. So, it looks weird left aligned and leaving some width at the right even when at 100%. Changing it to unset makes it stick to the edges of the parent container or say full width.

    Plugin Author Spacetime

    (@spacetime)

    Thread Starter Sujal Jain

    (@sujaljain007)

    Sorry, it wasn’t approved or maybe appeared to be deleted throwing 404 on this thread. Now, it’s approved later. I’d ask moderators to delete this thread now, if no issues with that.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.