I've designed a basic div overlay using the CSS code below:
position:absolute;
top:0;
left:0;
display:none;
cursor:default;
z-index:101;
width:100%;
height:100%;
To show the overlay, jQuery is utilized. Everything works perfectly on desktop browsers, but there's an issue on mobile devices where the div doesn't cover the full height of the screen. I've attempted adjusting the dimensions using screen.width
and screen.height...
, with no success.
I also tried adding
<meta name="viewport" content="width=device-width,initial-scale=1" />
to the index file, but that caused significant layout issues, making the overlay only 25% of the phone's width.
This situation is new to me, and I can't spot any problems in the CSS code. Any suggestions?