Having Trouble Scooting Down the Page on Mobile?

Hello there!

I'm having a bit of trouble trying to figure out why the scrolling functionality isn't working on my small web app when it reaches the media breakpoint for mobile devices.

If you'd like to take a look, here's the link to the pen:

https://codepen.io/tiapnn/full/ExVQPzM

Below is the CSS code I'm using:

body {
  background-color: darksalmon;
  font-family: 'Sigmar One', cursive;
  overflow-y: scroll
}

#pomodoro-container {
    position: fixed;
    top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 550px;
  height: 420px;
  border-radius: 10px;  
  background-color: white;

}

span {
  font-size: xx-large;
  font-family: 'Montserrat Subrayada', sans-serif;
}

header {
  font-size: 45px;
  font-weight: bolder;
  text-align: center;

}

#tomato {
  background-image: url(https://encrypted-tbn0.gstatic.com/images?q=tbn%3AANd9GcTTDnWL8S2wxKpTNnFueFEEURgwq5QuF6jJzWQYbV8YUnVJfh-I&usqp=CAU);
  height: 300px;
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  text-align: center;
}

#timer {
  margin: auto;
  display: inline-block;
}

i {
font-size: x-large;
text-align: center;
}

.right-div {
  margin: auto;
  display: inline-block;
  text-align: center;  
}

#timer-label {
  font-family: 'Sigmar One', cursive;
  font-size: 40px;  
  color: white;
}

#time-left {
  font-size: 60px;
  color: white;
}

.lowerI {
  color: white;
  font-size: xx-large;
}


@media screen and (max-width: 575px) {  

  #pomodoro-container {
    height: auto;
    width: 90%;
    top: 10%;
    transform: translate(-50%, 0%);

  }

  .right-div {
    padding: 35px;
  }

  header {
    font-size: 40px;
  }


}

Any thoughts on how I could make it scroll properly?

Thanks, Mattia

P.S: Just so you know, I've double-checked, and there's definitely no "overflow:hidden" in my CSS...

Answer №1

Your issue lies with the line of code you have.

Check the pomodoro-container {

position: fixed;

You might want to consider removing it :)

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

Having issues with the sidebar malfunctioning and unsure of the cause

<html> <head> <title></title> <link rel="stylesheet" type="text/css" href="style.css" /> </head> <body> I've been working on creating a sidebar for my website, but it's not functioning as expect ...

Is there a way to replicate a DIV and its contents in ASP.NET using C#?

I am looking to create a form that can duplicate or clone itself when the CPF/CNPJ (Brazilian personal identification) onchange. Below is the current code I have: <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" r ...

Looking to modify the HTML layout in order to be compatible with a specific script

Utilizing a form validation script with required:true data-validation will stop the form from submitting and highlight invalid fields in red by adding "has-error" to the parent container when the user submits the form. In the code snippet below, "has-erro ...

Utilize AngularJS to create a custom tag with a directive included

I've been working on creating a custom tag for a reusable component in a web page, but I seem to have hit a roadblock. It's not functioning as expected, and I feel like I might be overlooking something. If anyone could provide some guidance or p ...

What causes <input> elements to vertically center when using the same technique for centering <span> elements? (The line-height of <input> does not match its parent's height)

Important: The height of <div> is set to 50px, and the line-height of <span> is also 50px When 'line-height' is not applied to the <span>, all elements align at the top of the parent. However, when 'line-height: 50px&apo ...

Guide to creating a scrollable container that occupies the remaining height of the screen

Looking to create a fixed container that is scrollable, while keeping the rest of the page fixed? Check out this Stackblitz example. Here's a component called "PageDefault" that includes a Header and wraps each page in the application (the content of ...

Displaying NodeJS error messages directly in the main HTML file

After creating a form using NodeJs and implementing input validations that display errors when users enter incorrect values, I encountered an issue where the errors appear on a new blank page instead of within the main HTML file itself with stylish formatt ...

How to Ensure an Absolutely Positioned Element Occupies the Full Width of its Container

My main content area has a sidebar positioned absolutely to the right side due to various reasons. However, I am facing an issue where if the main content area is shorter, the sidebar extends beyond the content. Do you know of any CSS technique that can h ...

Unable to adjust the canvas size or scale using Fabric.js

Is there a way to display a large canvas as a smaller one for better user interaction without compromising the size of the uploaded canvas later on? I'm currently working with Fabric.js and exploring the Canvas CSS trick that involves setting the widt ...

What are the top techniques for designing with Angular 2 Material Design?

As a newcomer to angular 2 material design, I have noticed the primary, accent, and warn classes that apply specific colors to elements. Are these the only styling options available in Angular Material 2? Are there other classes that can be utilized for cu ...

issue with animation occurs when the value changes while the setTimeout timer is still running

function wallpaperMediaPropertiesListener(event) { // reset animation test.stop(true); test.css('margin-left', 0); // set song title. test.text(event.title); var testWidth = test.outerWidth(); // clone text ...

Looking to verify a disabled select element and adjust the opacity of that element when it is disabled

$_product = $this->getProduct(); $_attributes = Mage::helper('core')->decorateArray($this->getAllowAttributes()); ?> <?php if ($_product->isSaleable() && count($_attributes)):?> <dl> <?php foreach($_attrib ...

Counting the number of elements in a list can be problematic when using Firefox

Currently, I am in the process of writing CSS to customize the appearance of an XML document. Specifically, I aim to alter how child elements are displayed and have them resemble HTML OL/UL/LI elements. The structure of my XML file is as follows: <?x ...

Ways to assign a boolean value to HTML using Angular?

Can someone help me set the initial value of showProduct to false for the app-product HTML selector? showProduct:boolean = false; <button (click)="showProduct=!showProduct">Show Product</button> <div *ngIf="!showProduct"> <app-p ...

Divide the PHP code into separate files

Can someone help me with a coding dilemma I have? I couldn't find any information on Google or this site about it. A friend of mine who has experience in website development and runs his own business uses an interesting system that is new to me. He ...

IE 9 isn't displaying the Dropdown CSS Navigation

Welcome to my test page. Click here to view the test page. I recently found out that this page is not displaying correctly on Internet Explorer 9. Since I don't have IE 9, I'm using Net Renderer to preview my test page. Below you will find my ...

Resetting a component's color to its default state after being styled by a parent selector

The Bootstrap stylesheet contains the following code: pre code { color: inherit; } Even if I include an explicit pre code { color: red; }, the style from Bootstrap's stylesheet still takes priority. Why does this happen? [Edit: can ignore this ...

Exploring different options for parsing HTML content and extracting text from strings that do not contain HTML/XML tags

When looking at this particular solution for stripping HTML tags from a string, the process involves passing the string to rvest::read_html() in order to generate an html_document object. Subsequently, this object is input into rvest::html_text() to obtai ...

The width:auto attribute for images in ie6 is not functioning as expected

I am facing a challenge with dynamically changing and resizing an image element to fit its container. My current approach involves: Resetting the image: // Ensuring the 'load' event is re-triggered img.src = ""; // Resetting dimensions img. ...

Utilizing a CSS/HTML div grid to mirror a 2D array in JavaScript

Currently, I am working on a personal project that involves creating a grid of divs in HTML corresponding to a 2D array in JavaScript. However, I am uncertain about the most effective way to accomplish this task. Specifically, what I aim to achieve is tha ...