1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.4 How to prevent responsive ad unit from "bumping" page content?

Discussion in 'Styling and Customization Questions' started by kontrabass, Jan 5, 2015.

  1. kontrabass

    kontrabass Well-Known Member

    I have a top leaderboard DFP banner that is responsive depending on screen size (728x90, 468x60, or 320x50). What I'm noticing is that when the page renders, it first renders with no space given to the leaderboard. Then a split-second later (or longer if on a slow mobile), the content of the page "jumps" down to make room for the ad. This is annoying to me and our visitors.

    Do I need to assign a specific size to the <div> holding the ad? The <div> would have to be different height depending on the screen size...? Is there a recommended way of doing this? Conditionals in the ad_below_content template?

  2. Brogan

    Brogan XenForo Moderator Staff Member

    kontrabass likes this.
  3. kontrabass

    kontrabass Well-Known Member

    Ahh, ok. Easy enough :)

Share This Page