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

  • Home
  • SEARCH
  • 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 7565211
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:05:46+00:00 2026-05-30T14:05:46+00:00

Im making a web page that has a ‘fullscreen mode’. Its a normal web

  • 0

Im making a web page that has a ‘fullscreen mode’. Its a normal web page until you click a button and then a div is created that has 100% height and width, and the old content is hidden. The fullscreen mode provides another button to return to non fullscreen mode, which hides the div and unhides the original content.

This works fine except that I also want to hide the browser chrome with this JavaScript method:

        setTimeout(function() { 
        window.scrollTo(0, 1) }, 
        100);

The JavaScript scrolls down the page enough so the browser chrome is no longer visible. The problem is this requires the page to be taller than the viewport so its able to scroll. If the content has a height of 100%, this cannot happen.

My current workaround is to to add a padding of 70px to the bottom of the fullscreen div. This works fine for the iphone, but then this unnecessary spacing is added to all devices. This may break the fullscreen effect I want in some, and creates unnecessary scroll bars in dektop browsers.

Is there a smart work around? Or do I need to detect the browser chrome height or get it from detecting the device, and add this padding accordingly?

Thanks

  • 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-05-30T14:05:48+00:00Added an answer on May 30, 2026 at 2:05 pm

    The best way is to write dedicated css for devices and their orientation.

    You can see the media queries to detect the orientation of the devices ans set the css according to that.

    <link rel="stylesheet" type="text/css" href="ipad.css" media="only screen and (min-device-width: 481px) and (max-device-width: 1024px)" />
    <link rel="stylesheet" type="text/css" href="iphone.css" media="only screen and (max-device-width: 480px)" />
    

    To hide bar use this script:

    if (navigator.userAgent.indexOf('iPhone') != -1) {
            addEventListener("load", function() {
            setTimeout(hideURLbar, 0);
            }, false);
            }
    
            function hideURLbar() {
            window.scrollTo(0, 1);
            }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a web page where I'm making an AJAX call that returns
I'm making a web page that includes a clock with an arrow in the
I am making a dynamic web page that allows people to post their favorite
I have a web page on domain xyz.com that has a javascript being downloaded
I'm making a web page using CGI scripting which has a form users need
I am making some improvements on a web-site that has a youtube video embedded
i am autpmating a web site that have different function page. i am making
What is best way for making a draw panel in a web page. I
I'm making a RESTful web service call in my JavaScript page and get the
I am making a website that has a lot of links that do not

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.