Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9013715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:20:17+00:00 2026-06-16T03:20:17+00:00

I’m having one of the strangest rendering issues with Android browsers ( Galaxy Tab

  • 0

I’m having one of the strangest rendering issues with Android browsers (Galaxy Tab 10.1 and S3 so far .. haven’t tested on iPhone or other mobile browsers).

I’m dynamically embedding a fixed position responsive Youtube video on a webpage. You click a button in Javascript – it creates a black backdrop (also fixed position) and a Youtube embed with an id so I can control the properties at different screen sizes. So far so good. This goes off without a hitch. I check it out in Chrome, Firefox and even IE and I’m not disappointed. Yet.

I check it on my Android phone (Galaxy S3 – stock browser) and it appears that the video is having a hard time understanding where it’s supposed to be rendered. I notice at least 3 repositions before it settles on a spot. Sometimes I’m lucky to see part of the element is somewhat on screen. Most other times, not so lucky. The code hasn’t changed and the browser size definitely hasn’t changed; just the rendering has.

To make matters worse, it seems like the element is actually placed in the correct place but rendered incorrectly. If I click on the center (or near enough to it), the video plays! The rendering shows it playing while re-rendering constantly, still unsure of where its supposed to be.

I know this problem sounds super-crazy and it might be a tricky one to even diagnose (let alone debug) so I’m including as much code related to the whole operation as possible. Help is greatly appreciated!

Creating and Embedding the Video

donModal.addEventListener("click", function(e) {

        e.preventDefault();

        var donPreview = document.createElement("iframe");
        donPreview.src = "http://www.youtube.com/embed/oeZgLFsglcc";
        donPreview.frameborder = "0";
        donPreview.allowfullscreen = "allowfullscreen";
        donPreview.id = "donModalVideo";

        document.body.appendChild(donPreview);

        sfx.toggleBackdrop(donPreview);         
    });
}

Video Styles

#donModalVideo {
  position: fixed;
  width: 40%;
  height: 50%;
  top: 25%;
  left: 30%;
  z-index: 95;
}

URL for Test

Can’t fiddle right now .. hope this is ok …

http://openheavens.designbymobius.ca/artistes#donmoen

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T03:20:18+00:00Added an answer on June 16, 2026 at 3:20 am

    Solved it!!!

    There were a combination of factors that contributed to the problem.

    1. There was no height set for it (or it’s parent element).
    2. Fixed position is glitchy on mobile devices

    Armed with that knowledge, I:

    1. Changed the position property to static.
    2. Wrote a little function to set the height as a fixed ratio of the width (I used 0.5625) which triggered every time the window was resized. Now the video size is flexible and it perfectly maintains its ratio.
    3. Wrote a second function to set the top value as the (viewport height - video height) / 2 + window.pageYOffset. It’s triggered whenever you scroll the page.

    End result is a static position video which dynamically adjusts width while maintaining its ratio as well as simulates the effect of position: fixed.

    The end result can be seen here. Click to watch an artist preview video 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm interested in microtypography issues on the web. I want a tool to fix:
We're building an app, our first using Rails 3, and we're having to build
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I know there's a lot of other questions out there that deal with this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm having trouble keeping the paragraph square between the quote marks. In firefox the
I'm making a simple page using Google Maps API 3. My first. One marker
Let's say I'm outputting a post title and in our database, it's Hello Y’all
I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.