scrolling disabled in mobile browser

After testing my new site on my Android phone, I noticed that I am unable to scroll anywhere on the page. However, when viewed on Firefox, Opera, IE, and Chrome desktop browsers, I am able to scroll vertically when needed. In the CSS rule for my HTML body, I have set overflow-y to scroll so only width should not be scrolled. It seems like I must be missing something simple here as this issue has never come up in any other sites I've worked on.

Below is the CSS code for the site:

@charset "utf-8";
/* CSS Document */
#body{
    min-width: 900px;
    width: 75%;
    background-size: cover;
    background-image: url(../graphics/back2.jpg);   
    position: relative;
    margin: 40px auto;
    padding: 10px;
    border-style: groove;
    border-width: 5px;
    border-color: #000; 
    background-repeat: repeat-y;    
}
a:link, a:visited, a:active{
    text-decoration: none;
    color: inherit;
}
a:hover{
    color: #FFF;
    text-decoration: underline; 
}
html, body{
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow-y: scroll; 
    background-image: url(../graphics/craig-smith-background.jpg);
    line-height: 25px;
}

h1{
    font-size: 36px;
    font-family: "Times New Roman", Times, serif;
    color: #000;
    margin: 10px;
}
 h2{
    font-size: 30px;
    font-family:"Times New Roman", Times, serif;
    margin-left: 30px;
    color: #333;
    font-weight: 700;
    margin: 20px;
}
h3{
    font-size: 24px;    
    margin: 10px;
}

p{
    font-size: 20px;
    font-family: "Times New Roman", Times, serif;
    color: #FFF;
    text-indent: 1.5em;
    margin-left: 1.5em;
}
#quote{
    margin-left: 30px;
    font-style: italic;
    font-family: lucida;
    font-size: 18px;
    border-style: inset;
    border-color: #333;
    border-width: 2px;
    height: 80px;
}

#header{
    width: auto;
    margin: 0 auto;
    position: relative;
    text-align: center;

}

#nav{
    position: absolute;
    z-index: 1;
    left: 25%;

    top: 150px;
    }
.picture{
    display: inline-block;
    position: relative;
    margin: 0 auto;
    border-style: groove;
    border-width: 5px;
    border-color: #999; 
}

.clear-left{
    clear: left;
    position: relative;

}

.clear-right{
    clear: right;
    position: relative;
}

.clear-all{
    clear: both;
    position: relative;
}

#left-col{
    width: 25%;
    min-width: 300px;
    position: relative; 
    float: left;
    text-wrap: normal;
    overflow: hidden;
    margin-bottom: 10px;
    margin-top: 10px;
    text-align: right;
}

#right-col{
    min-height: 500px;
    min-width: 500px;
    width: 65%;
    text-align: left;
    float: right;
    border-style: groove;
    border-width: 5px;
    border-color: #CCC;
    margin-bottom: 10px;
    margin-top: 10px;
    text-wrap: normal;
    text-indent: 10px;

}
#footer{
    width: 85%;
    height: 40px;
    background-color: #999;
    text-align: center;
    margin: 10px auto;
    padding: 0px;
    padding-bottom: 10px;
    border-style: groove;
    border-width: 2px;
    border-color: #999;
}

#project-description h1{
        text-align: center;
        font-size: 36px;
}

.project-description h2{
    color: #333;
    font-weight: bold;  
}

.project-description{
    border-style: inset;
    border-width: 3px;
    border-color: #333;
    margin: 10px;
    padding: 5px;
}

.project-description p{
    margin-left: 70px;  
    text-indent: 0;
}

table{
    border-spacing: 0;
    border-collapse: collapse;
}

td, th, tr{
    padding: 0; 
    line-height: 20px;
}

Finally, you can visit the live site by clicking here.

Answer №1

Avoid applying the overflow-y: scroll; style to the body and html tags as it creates a double scrollbar issue that doesn't work well on mobile browsers. It's unnecessary to specify this style since it is the default behavior. Instead, consider setting overflow-y: scroll; and overflow-x: hidden; only on the body tag.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

The JQuery command to set the display property to "block" is not functioning as expected

When trying to toggle the visibility of my TextBox based on a selected value in a RadiobuttonList, I initially wrote the following code: $("#<%= rbtnIsPFEnabled.ClientID %>").click(function () { pfno = $("#<%= txtPFNo.ClientID %&g ...

What is the best way to incorporate a sidebar menu in an HTML webpage?

I am interested in creating a sidebar menu for my website using either HTML, CSS, or JavaScript. The W3 Schools website has a side menu that I find appealing and would like to create something similar. ...

What is the best way to utilize $(target) within a directive?

I created a custom directive for selecting time using two blocks. The challenge is detecting the target event on specific blocks within the directive's template. Directive Template: <div class='time-picker-container'> <div clas ...

Bootstrap fixed top navbar with a double color scheme

I would like to replicate the following image: using a navbar-fixed-top with Bootstrap. Currently, I have added the following custom CSS: navbar-fixed-top.css .navbar { background-color: #8CB5A0; background-image: none; } Here is the Bootstrap ...

Using CSS or JavaScript to trigger events while scrolling with touch

Imagine a scenario where multiple boxes are stacked on top of each other: <div style="width: 100%; height: 100px; background-color: red"> stuff </div> By clicking or touching them, the background color can be easily changed using CSS (:hover, ...

Creating a Masonry Gallery without any spacing between images

I'm looking to create a unique masonry gallery design that eliminates any gaps between images. I've experimented with various plugins like masonry and isotope, but they still leave gaps in the layout. Packery seems promising, however it tends to ...

The process of increasing value through a function in PHP

Looking to create a function that increments a variable when a button is clicked. I have 4 buttons: farm, cave, house, casino The goal is to accumulate the random numbers generated by each button and add them up in the "YOUR GOLD" section. For example, c ...

Issues arise when setting a delay for CSS transitions to occur due to the

I'm trying to create a scroll bar that only appears when hovered over, similar to how it works on Facebook where the scroll bar shows up slowly instead of all at once. I've tried using CSS transition delay, but it doesn't seem to be working ...

ChartJS is exhibiting an issue within a modal or popup window where the chart is being displayed with a height

I want to show a graph in a modal window when the user clicks a button. The modal is hidden with display: none;, and becomes visible with display: flex; once the button is clicked. If I move the chart outside of the modal, it works without any issues. Ad ...

When the flexbox is nested in a container with a flex-direction of column, the scrolling

I'm facing a challenge in setting up a basic message container that can scroll when necessary. The issue arises when I place the message box within another container and add a side bar, causing the message box to exceed the parent container's hei ...

Text alignment issues cause animation to vanish

Utilizing particles.js, I set up a full-screen particle effect by specifying the animation to be full-screen with height: 100vh;. This worked perfectly as intended. However, when attempting to add text on top of the particle animation and center it vertica ...

What is the best way to organize a flatlist for rendering?

I'm struggling with separating some flat-lists into different components. How can I arrange the rendering of the flat-list like the sample form (Picture "Sample UI")? I've tried, but it's not working correctly as it renders flat list A first ...

Arrange the items in the last row of the flex layout with equal spacing between them

How can I arrange items in rows with equal space between them, without a large gap in the last row? <div fxFlex="row wrap" fxLayoutAlign="space-around"> <my-item *ngFor="let item of items"></my-item> </div> Current Issue: htt ...

Transitioning images smoothly and responsively with jQuery, creating a beautiful

Hey there! I'm looking for some help with transforming this jQuery effect. Instead of having fixed sized images, I want to set the size in percentage (width:100%; height:auto) so they can be responsive. Any creative ideas or suggestions? <scri ...

What is the best way to ensure that the content fits within a div with a given max-width set by the parent div?

image description goes here I have a container set to a maximum width of 80%, but when the text inside extends beyond that, the container remains stuck at 80% instead of adjusting its size accordingly. Can anyone provide a solution for this issue? ...

Tips for implementing a watermark background image that appears in each section of a single-page website

Currently, I am exploring HTML, CSS, and Bootstrap and facing a particular issue. I am attempting to add a logo to a website as a background. I have already discovered how to do this by following the instructions here. This website is comprised of a sing ...

How come Font-face isn't functioning properly on Internet Explorer 11?

I have designed a new website at , however, I am facing issues with my CSS on Internet Explorer 11 (version 11.608.15063.0). The font-face and dropdown menu are not displaying correctly. Can anyone assist me with this problem? ...

Issue with sticky navigation bar causing page content to shift

Any ideas on how to solve my issue with a sticky nav bar in Twitter Bootstrap? Whenever I scroll past a certain point, the navbar sticks but causes my content to jump. I want the content to stay in place without jumping. Here is my HTML code: <body> ...

Scrolling to the next wrap class in jQuery is not functioning properly with the chatbox and ScrollTop

I have created a chat box using jQuery. However, I am facing an issue where when I click the button multiple times, the scroll returns to the top. My objective is for the scroll to move to the next wrap class when the button is clicked. Here is a snippet ...

The carousel is having trouble aligning the images div to the center

Struggling to create a carousel slide that automatically resizes image, but can't seem to get the inner div containing the images to center within the outer div. Even after trying various CSS properties like text-align:center and margin-left: auto, th ...