Welcome to WebmasterWorld Guest from 3.80.6.254

Forum Moderators: martinibuster

Message Too Old, No Replies

Strange bug at responsive AdLink

The "info" remains at same place at layout change

     
7:54 am on Sep 10, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member jetteroheller is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 22, 2005
posts: 3062
votes: 6


There are 2 different responsive AdLinks, each in a <div style=width:600;height:20>

So they show normal a grey "info" and 3 AdLinks.

Just tested my site with changing zoom in Google Chrome.
At each zoom change, the info appears at the same height as the 3 AdLink buttons, but after some 1/10 seconds, the grey "info" jumps about 10 pixel up.

At a certain zoom level, my layout is changed by javascript to new positions.
All layout elements appear at the new position.
All AdSense ads appear at the new position.

Only from the second responsive AdLink, only the AdLink 3 buttons change positions,
but the grey "info" remains at the same position.
8:28 am on Sept 10, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


Sometimes one JS plays havoc with the browser when you add another JS.

Instead of moving mine via JS, I float the div with the ad via CSS when the view is expanded. Haven't seen any bugs doing it that way.
9:44 am on Sept 10, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member jetteroheller is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 22, 2005
posts: 3062
votes: 6


The difference is: One responsive AdLink is in a DIV positioned by CSS,
the other is in a DIV positioned by javascript.

I position only the DIVs "logo" and "content" by CSS. At all the other, this is not possible, because it's not possible to do all the calculations in CSS.

My layout is in 600 pixel width blocks. Depending on screen width, there are 1 to 6 blocks in the width.
DIV logo is always top left. DIV content is placed right of the logo at screens with more width than 1250 or below the logo.

At all other elements, the javascript places in the column, which is shortest.
10:10 am on Sept 10, 2017 (gmt 0)

Senior Member from US 

WebmasterWorld Senior Member keyplyr is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Sept 26, 2001
posts:12913
votes: 893


the other is in a DIV positioned by javascript
So if the buggy ad is the one in the div positioned by JS, that's what I mean by one JS causing another JS to have an issue.

The Adsense code is JS. When you nest it in another JS for positioning, that's where the browser can sometimes get confused.

Not all browsers will react the same way, so it's possible only one or two browsers may show the bug.

I don't have a fix except to find another way to position the div with the ad.
10:59 am on Sept 10, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member jetteroheller is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 22, 2005
posts: 3062
votes: 6


The error has for luck only for very few an effect.
It occurs only at changing the windows width to less than 1250 pixel width.

When the windows width is at loading less than 1250 pixel, it works fine.
11:02 am on Sept 10, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member jetteroheller is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 22, 2005
posts: 3062
votes: 6


I have seen it only because I am just creating some new features.
When I open the Chrome developer tools, the window available to the web page shrinks below 1250.
10:58 am on Sept 22, 2017 (gmt 0)

Senior Member

WebmasterWorld Senior Member jetteroheller is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 22, 2005
posts: 3062
votes: 6


I have seen in the last days several times this ad units without the bug.