Stop the div from overflowing

I am currently in the process of developing a unique horizontal animated page transition system which involves scaling the screen to fit the incoming page. However, I have encountered an issue where if the new page is smaller than the previous one, it causes the larger page to overflow outside of my content wrapper, ultimately extending beyond the footer of the page. You can view a screenshot of this problem here.

In the image, you can see how the current page exits on the left side after the screen has resized to accommodate the smaller incoming page, resulting in unwanted white space extending beyond the yellow footer.

Currently, the CSS for my "page" class looks like this:

.myPage
{
width: 100%;
max-width: 100%;

margin-left: auto;
margin-right: auto;

position: absolute;

top: 0;
left: 0;
display:none; /*Pages are displayed once called*/
opacity: 1;
}

I have tried using overflow-y:hidden to solve the issue, but unfortunately, that did not work as intended.

Is there any solution to prevent my page class from extending beyond the content boundaries and causing disruption to my overall page layout?

EDIT:

Below is the code for the page wrapper element:

.pageWrapper
{
background: #FF0000;
position: relative;
width: 100%;
height: 100%;
-webkit-perspective: 1200px;
-moz-perspective: 1200px;
perspective: 1200px;
-webkit-transform: translateX(0%);
}

Edit2: If you'd like to take a look at all my code, you can find it in this broken jsfiddle: Link to jsfiddle

Answer №1

overflow-y may not function properly unless a specific height is designated. Consider defining the height as 100% or another suitable value.

Alternatively, in this scenario you could opt to use bottom in place of height to provide the element with a fixed height.

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

Bring to the front the div altered by a CSS3 animation

Recently, I encountered an issue with a div card that triggers an animation when clicked. The animation involves the card scaling up larger, but the problem arises as its edges get hidden under other cards. To visualize this, take a look at the screenshot ...

Difficulty encountered in setting the background image to cover the entire screen

I'm facing difficulties while creating a parallax website. Specifically, I'm having troubles with CSS. Here's the HTML code: <div id="skrollr-body"> <div class="subnav"> <ul id="nav"> ...

What's the best way to make sure an image and text are perfectly aligned on the

How can I align an image and text on the same line, as currently the a tag is higher than my text? Here is the HTML code: <div class="author-name"> <img class="article-author-img" src="{{ preload(asset('assets/st ...

Develop a straightforward static webpage and set it up by installing and launching it using NPM

I am attempting to craft a straightforward HTML page that incorporates CSS/JS and utilizes npm. The objective is to construct a basic page that can be accessed by simply using "npm install" and "npm start". As an example, I will design a page with HTML, ...

Is there a way to customize the look of the time selected in the <input matInput type="time" step="1" /> time picker?

Currently, I am utilizing the following code as a time picker in my Angular 9 application. My goal is to modify the selected time's color to a bright blue shade. How can I accomplish this task? <input matInput type="time" step="1&quo ...

Steps for pulling information from the database and presenting it in a text box for users to edit

I'm struggling with a webpage that should allow users to update data from the database, but for some reason, the data is not displaying in the textbox. How can I make it show up correctly? Currently, on my webpage, users have to manually input all th ...

Is it possible to insert a button into a specific column of an ngx-datatable within an Angular 8 application?

I am having trouble with this particular HTML code. <ngx-datatable-column name="Option" prop="option" [draggable]="false" [resizeable]="false [width]="250"> <span> <button class="optionButton" type="button" data-to ...

``The issue concerning the preloading layer on the website``

My experience with the website www.wirecreation.net is sometimes marred by an issue during the initial load. It seems that there is a margin of a few pixels on the gray div containing the logo and progress bar at times, but other times it appears with zero ...

Transforming the hue of a radio-button

When it comes to the default CSS code for radio buttons, they appear gray when unselected and blue when selected: https://i.stack.imgur.com/hsazr.png However, I have a specific requirement for them to be black in both states. In order to achieve this, I ...

"Using jQuery autocomplete to enhance user experience by providing both value and

Thank you for taking the time to read this. I have been searching for a solution to my problem by reading similar posts, but I am still confused about how to make it work. Here's the issue: I have a jQuery autocomplete that retrieves an array from a ...

What methods can be utilized to create sound effects in presentations using CSS?

Let us begin by acknowledging that: HTML is primarily for structure CSS mainly deals with presentation JS focuses on behavior Note: The discussion of whether presentation that responds to user interaction is essentially another term for behavior is open ...

Is there a way to achieve a full-page inset shadow using absolute positioned elements?

Currently, I am facing a challenge with a page that has an inset box shadow on the body element. When there are absolute and relative positioned divs on the page that expand enough to generate a scrollbar, the box shadow is cut off even when the height is ...

Elements refuse to show up in a single line

I've styled two div elements with the properties below: .elem1 { width: 47.5%; margin-right: 2.5%; display: inline-block; } .elem2 { width: 47.5%; margin-right: 2.5%; display: inline-block; } Note: When I decrease the margin ...

Creating HTML forms allows for images to be used as checkboxes

I'm attempting to convert an HTML forms checkbox into a clickable image that changes its appearance when clicked. Additionally, I need it to be capable of storing one or two variables (specifically for generating them with row and column values) and f ...

- increase clarity and readability- separate sections for better

I'm working on a code snippet to showcase 4 buttons: #buttons { text-align: center; padding-top: 4%; } #buttons img { display: inline-block; list-style: none; padding: 10px; } #buttons p { color: #fff; font-family: ; font-weight: ...

PHP and JQuery not working together to update database

Essentially, I am trying to update the status based on the unique id. Despite no errors being thrown, the status remains unchanged. index.php $(document).ready(function() { $('.seatCharts-seat').click(function(){ var id = jQuery(th ...

Problem with loading image from local path in Angular 7

I'm having trouble loading images from a local path in my project. The images are not rendering, but they do load from the internet. Can someone please help me figure out how to load images from a local path? I have already created a folder for the im ...

Tips on configuring the path to incorporate Bootstrap CSS, JavaScript, and font files/classes into HTML when the HTML file and Bootstrap files are located in different directories

<!DOCTYPE html> <html> <head> <title>Unique Demo</title> <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" media="screen"> </head> <body> <div class="container"> <form ...

A guide on accentuating the active menu item using PHP

Looking for a solution in the header.php file. How can I highlight the current page in a menu navigation included on every page of my website using only include("header.php")? Any help is much appreciated. Thank you <div class="form-inline" id="myDIV" ...

Is there a way to use jQuery to centrally align the accordion item that I have chosen?

My attempts to use `this.scrollIntoView({behavior: "smooth"}) were yielding inconsistent results in terms of where the selected item would land on the page. I believe I might need to utilize scrollTop(), but as someone who is new to jQuery, I am ...