Issue with Padding Bottom in Firefox, Safari, and Internet Explorer 11 browsers

When I add top and bottom padding to a parent element, and the child of that parent does not have a specified height with overflow-y set to auto, there is an issue where the bottom spacing of the parent is not properly applied when scrolling to the bottom. While this issue seems fine in Chrome which follows the CSS box model, other browsers may display this problem.


body, html {
   height: 100%;
   width: 100%;
   margin: 0;
}
.parent {
    padding: 30px;
    box-sizing: border-box;
    height: 100%;
    overflow-y: auto;
}
<div class="parent">
  <div>Lorem Ipsum is simply dummy text of the printing and typesetting industry...</div>
   <div>Where does it come from? Contrary to popular belief, Lorem Ipsum is not simply random text...</div>
</div>

Answer №1

It has been identified that the browsers Forefox, Safari, and IE11 have a bug related to padding-bottom. An effective solution to address this issue is by applying padding-bottom specifically for the last-child element.

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

Error: Unbalanced parentheses detected in the argument list at file path C:UsersgajjaOneDriveDesktopuser_loginviewsupdate.ejs during ejs compilation

When I try to update, instead of showing the form fill field, an error pops up. Can someone assist me with this? <!DOCTYPE html> <html> <head> <title>Form Data</title> </head> <body> <h1>Form Dat ...

Preventing the flipping effect with jquery flippy

Hey there! I've been using a cool flippy jquery plugin that I found on this website. It's working great, but I have run into an issue. When the element flips, I want to include a button on the flip side that takes the user to a different page. T ...

How can I replicate Firefox's behavior for HTML5 validation in Chrome by displaying red borders around required or invalid input elements?

Is there a way to add red borders around the input element in Chrome for HTML5 validation similar to Firefox? I've been searching extensively but have yet to find a definitive answer. Any guidance on how to achieve this using CSS would be highly appr ...

Bootstrap does not conform to standard image sizing conventions

Why is the sizing property of Bootstrap not applying to images when using h-100? When I try to style them inline, everything works as expected, but setting it as h-100 doesn't work for the images. Can someone please explain this issue? <div id=" ...

Unlock the full potential of Vuejs by implementing HTML5 validation checks for input fields

How can I incorporate html5 form.checkValidity() with a form that includes custom components in vuejs 2? Validation works seamlessly with standard html5 inputs: <form name="myform" ref="formref"> <input type="text" ...

Invoke a TypeScript function from the HTML code embedded within a TypeScript component

In my pop-up window, there are 2 buttons: Update and Delete. I need to implement functionality so that when the Update button is clicked, the current pop-up should disappear and a new editable pop-up with the same fields should appear, along with two addit ...

Primeng - Concealed dropdown values within a scrollable table header

Recently, I integrated Primeng p-table with a filter and frozen column feature (with one column being fixed while the others are movable). However, I encountered an issue with the select dropdown in the header. When I try to open the dropdown, the values a ...

WebRTC signalling has been successfully completed, however, the remote video functionality is still not functioning as expected

I attempted to set up webRTC and successfully negotiated the peerConnection. However, I am encountering an issue where remote videos are not playing. For more information, you can check the detailed console logs at this link - fb.privetbureau.com Here is ...

Executing function with ng-click in AngularJS only on the second click of the button

Currently, I am studying AngularJS and working on an exercise that involves using the ng-click function. Strangely, I am only able to view the result after clicking upload for the second time. I am trying to display my json content but it's not workin ...

Utilizing Selenium and Python to Extract Links from a Web Table

Currently, I am faced with a table that has two columns and an unknown number of rows. My task involves utilizing Selenium (with Python) to extract all the links from the second column and compile them into a list. https://i.sstatic.net/bvYez.png The obj ...

Transitioning to mobile-friendly web design

Just completed my very first page for a personal portfolio website. As a novice in web development, I made the width of my site 1600px to match the background image. Now, my goal is to make the page responsive. However, when I adjusted the width to 100%, ...

PHP: Bootstrap CSS for Carousels

I'm experiencing some difficulties with the Bootstrap CSS Carousel on my website. The left and right arrows seem to be unresponsive, and the slides are not transitioning automatically. I have been unable to identify the root cause of this issue. Belo ...

Automatically populate email fields with pre-filled form data

Looking to create an HTML form that utilizes JS/jQuery (no PHP) to capture data from "subject" and "message" fields and send an email. The goal is for the client-side code to open the user's mail client, pre-fill the subject and body with form data, a ...

Design a responsive button that is vertically centered

As I work on developing a responsive website using bootstrap, my current challenge lies in creating buttons that are not aligned vertically. Here is the code snippet I am working with: <div class="play col-xs-24 visible-xs-block"> <div class=" ...

What is the recommended image size for Next.js websites?

According to documentation: The width of the image, in pixels. Must be an integer without a unit. The height of the image, in pixels. Must be an integer without a unit. https://nextjs.org/docs/api-reference/next/image Different devices come in various ...

Using an icon within a frameset

I have encountered an issue with using GoDaddy to mask my website. The problem arises when a user accesses the site directly through its actual address; in this case, the icon appears in the browser tab. However, when the user accesses the site through the ...

Place a circular grid at the center of a webpage

Is there a way to align this grid in the center of a webpage? It appears skewed on mobile view but not on larger screens. The issue seems to be primarily with mobile devices. For instance, when viewed on a mobile device, the circles are positioned to the r ...

The submenu within the menu fails to expand

<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"/> <header> <nav class="navbar navbar-expand-sm navbar-light bg-light"> <div class="collapse navbar-collapse" id="navbarSupportedConten ...

Is it possible to set all UI forms to a readonly/disable mode?

We have a specific requirement where, if the user's access level is set to "READ ONLY", all form input elements should be made readonly. Our coding approach involves using a template HTML that contains widgets which are referenced in the correspondin ...

What are the various methods for incorporating icons and logos into website design?

Can anyone provide insights on the quality of logos and icons used in professional websites? I often create logos and icons using Illustrator, but when comparing them to icons on websites like those shown in the provided image and links, mine appear blurry ...