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 8020847
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T21:48:24+00:00 2026-06-04T21:48:24+00:00

Since we can’t detect if a website is standalone or not in php, I

  • 0

Since we can’t detect if a website is standalone or not in php, I did it in javascript. I wanted to hide all the website with a white div and write a little sentence in it to say to add the app to home screen. (I maked it red while testing).

I tried <div style="width:100%;height:100%;" ></div> of course with the body and the html at 100% too; but there was a white space at the right and the bottom of the page. (I think it was for the scroll bar).

Then I set the width and the height to 110% and the overflow of the body and the html to hidden; but it didn’t work. (A problem with overflow:hidden in iPhones).

Then I wanted to set the size of my div to the size of the device (with media queries), but when I switch from portrait to landscape, the size keeps the same and the div doesn’t expand.

Can someone tell me a way to do this? (Maybe using javascript to change the class)

  • 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-04T21:48:25+00:00Added an answer on June 4, 2026 at 9:48 pm

    Just put a the div just beneath the body:

    <body>
        <div id="myDiv"></div>
    </body>
    

    CSS:

    #myDiv {
      position: absolute;
      top: 0;
      bottom: 0;
      left: 0;
      right: 0;
      z-index: 999;
    }
    

    This will make the div as large as the screen.

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

Sidebar

Related Questions

Situation: Site with content protected by username/password (not all controlled since they can be
Since we can run JavaScript using various interpreters, like V8 or Rhino, I thought
Since Google Can Now Execute AJAX & JavaScript For Indexing , what does that
Yes, I can't. It seems weird ostream has no close, since istream can detect
I'm facing some doubts in PHP database connections. Since I can't just put a
I have realized that my first question won't be answerable, since php can't deal
Since you can not access element of the NSMutableSet randomly, does this mean it
since I can not markup content inside tags I want to create my own
since i can not have space in enum and i am trying to do
OK, so this is not the most useful question since I can't remember the

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.