Firefox is a great web browser for handling CSS Flex Box layouts with varying

html,
body {
  padding: 0;
  margin: 0;
  height: 100%;
  min-height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  
}

header {
  flex: 1;
  height: 60px;
  background: lightblue;
  padding: 0;
  margin: 0;
}

header p {
  text-align: center;
}

.main-wrap {
  display: flex;
  flex: 1 1 auto;
  width: 1000px;
  background: lightgreen;
  margin: 0 auto;
  
  height: 100%;
}



.right-pane {
  display: inline-flex;
  flex: 1 1 auto;
  flex-direction: column;
  background: #76DAFF;
}

.right-head {
  text-align: center;
  height: 40px;
  flex: 1;
  background-color: #DDCA7E;
}

.right-body {
  background-color: #B9F;
  display: inline-flex;
  flex: 1 1 auto;
  overflow-y: auto;
}
<html>

<body>
  <header>
    <p>I am a fixed header</p>
  </header>
  <div class="main-wrap">
   
    <div class="right-pane">
      <div class="right-head">
        <p>I am a fixed container</p>
      </div>
      <div class="right-body">
        <ul>
          <li>Scroll me I am famous!</li>
          <li>Scroll me I am famous!</li>
          <li>Scroll me I am famous!</li>
          
        </ul>
      </div>
    </div>
  </div>
</body>

</html>

This code snippet performs well in Safari9 and Chrome, but it fails on Firefox. My goal is to hide the main scrollbar on the page.

It seems like the "height: 100%" property includes the first header's height.

https://i.sstatic.net/9czJ7.png

https://i.sstatic.net/O23XY.png

Answer №1

Implemented min-heigh property within the scrollable parent element.

.main-wrap {
  display: flex;
  flex: 1 1 auto;
  width: 1000px;
  background: lightgreen;
  margin: 0 auto;

  height: 100%;
}

Addressed issues related to using flexbox in Firefox and Chrome version 48 as discussed in this thread.

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

Tips for updating the font color of BarMenu in Blazorise

I am struggling to change the default font color of the bar menu to red in a razor page. Despite trying the code below, it doesn't seem to work: <Bar Breakpoint="Breakpoint.Desktop" Background="Background.Light" ThemeContr ...

Changing the height of columns in an email template for different screen sizes in Outlook

This email was designed specifically for marketing purposes within my company. We obtained a template from themeforest and have made modifications accordingly. While I have managed to address most of the issues caused by Outlook, there is one particular pr ...

Utilize TypeScript File array within the image tag in HTML with Angular 2

I am in the process of developing a web application that allows users to upload CSV data and images, which are then displayed on the application. However, I have encountered an issue where I am unable to display the imported images. The images are imported ...

Achieving proper HTML element order?

Here is the HTML page I am working with: Click here to view the code on jsfiddle <!DOCTYPE html> <html> <head> <meta charset="UTF-8" /> <title>Extended UI</title> <style type="text/css"> .header{ padding-rig ...

Is it possible to display a Processing message at the beginning of a datatables table already containing data?

Within my Laravel 5.7 application, I have implemented the "yajra/laravel-datatables-oracle": "~8.0" library and found a helpful thread on customizing the processing message at this link. I adjusted the processing message styling as follows: .dataTables_pr ...

Dynamically Alter Notification Background

I have created a demo page with some code for a smart notification. The issue I am facing is that even though the CSS is initially set to black, I want to dynamically change it to a random color upon creation. When I try to do this in the inspector, it w ...

Is it possible to show one element while hiding others upon clicking using JavaScript?

Concept My idea is to create a website with a navigation menu where only one section is visible at a time. Each section would become visible upon clicking a specific button in the navigation bar. Challenge I attempted to achieve this using the following ...

Troubleshooting problems with the width of a UI Bootstrap accordion container

Check out this Plunker for help! Having some trouble with ng-Grid inside a ui.bootstrap accordion. Visit my Plunker to see the issue firsthand. Essentially, when I place a grid inside an accordion with the child accordion-group closed upon page load, the ...

Disabling pagination for custom searches in datatables

I need to implement a search filter based on only 2 columns using text fields. So, I have set up two text fields: <input type="text" id="type" name="type" placeholder="Filter by User Type"></td> <input type="text" id="dept" name="dept" pla ...

Is there a way to enclose a set of elements that are aligned to the

I am facing an issue with a container div that contains multiple items. The container requires a border, but the problem arises when I float the elements left within the container, as it seems to disrupt the flow of the elements. Adding a border to the co ...

The Bootstrap Carousel unfortunately does not provide the option for responsive images

There appears to be an issue with the bootstrap carousel images where they are being assigned a fixed height/width attribute by either views or bootstrap_views. As a result, when the page is resized or viewed on a smaller screen or device, the image gets ...

Error: "Bootstrapsudio is experiencing a missing option in the col-md-

Recently, I was following a tutorial on Bootstrap Studio that showcased the design of a bakery named "Mom & Pop's Bakery". The tutorial highlighted how we could adjust the size of a column within a container by manipulating the column size on the righ ...

What is the Best Way to Send JavaScript Variables to MYSQL Database with PHP?

I am having trouble sending my variable to a MySQL database. The database only displays the variable when using the HTML input tag. The error message I received was "Undefined index: rate & amount." Seeking assistance to resolve this issue. Thank you! ...

How can I define margins for a specific div in print media using CSS?

Hello everyone, I'm currently experiencing an issue with my print media CSS. On the HTML page, there are two main divs - one for the body and one for the footer. <div class="main-template-body" id="main-template-body"> //content </div> ...

I successfully passed an array of objects to the "value" attribute of a <li> element, and then connected that array to the component's state. However, for some reason, the array is

I need to render specific data based on the value attribute assigned in the li tag, which is stored in a state called otherState in my implementation const [otherDetails, setOtherDetails] = React.useState([]); const state = { listitems: [ { id ...

The JavaScript array slideshow is experiencing some glitches in its transition

After diving into JavaScript recently, I managed to center a div and make it fullscreen as the window resizes. However, things got tricky when I added a script I found online to create an image transition using an array. Unfortunately, these scripts are co ...

Step-by-step guide on generating a canvas with a circle inside whenever a button is pressed

I need help with my code that is supposed to add a new canvas with a circle inside every time a button is clicked. The new canvas should be displayed next to the older ones. Here is my current code: I have two default canvases on the page, and I want new ...

Is resizing possible using the Canvas identifier?

Is it possible to adjust the canvas size to match the width of the page using the canvas id's style in the html? Then in your javascript code for the canvas, can you have resize listeners that are responsive to the canvas size at any given time? I c ...

retrieve the position of a descendant element in relation to its ancestor element

I'm encountering a challenge while attempting to solve this issue. I have elements representing a child, parent, and grandparent. My goal is to determine the offset position of the child (positioned absolutely) in relation to the grandparent. However, ...

Decide on the chosen option within the select tag

Is there a way to pre-select an option in a combobox and have the ability to change the selection using TypeScript? I only have two options: "yes" or "no", and I would like to determine which one is selected by default. EDIT : This combobox is for allow ...