Scrolling issues experienced with CSS3 flex box in Firefox

Using the box-flex property for my layout isn't allowing me to achieve a scrollable flex box.

Here is the HTML:

<div class='dashboard'>
  <div><button>Widget</button></div>
  <div class="noboard"><button>Yammer</button>
  <div class="yammerboard" >
      <div><button>Dashboard22</button></div>
      <div><button>Dashboard22</button></div>
      <div><button>Dashboard22</button></div>
      <div><button>Dashboard22</button></div>
      <div><button>Dashboard22</button></div>
  </div>
  </div>
  <div><button>Notifications</button></div>
</div>

And here is the CSS:

.dashboard {
    display: box;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-box;
    box-orient:vertical;
    -ms-box-orient: horizontal;
    -moz-box-orient:horizontal;
    -webkit-box-orient: horizontal;
    border: solid 2px black;
    overflow-y:auto;
}
.noboard {
    display: box;
    display: -webkit-box;
    display: -moz-box;
    display: -ms-box;
    box-orient:vertical;
    -ms-box-orient: vertical;
    -moz-box-orient:vertical;
    -webkit-box-orient: vertical;
    overflow-y:auto;
}
.yammerboard {
    display: box;
    display: -webkit-box;
    display: -moz-inline-box;
    display: -ms-box;
    box-orient:vertical;
    -ms-box-orient: vertical;
    -moz-box-orient:vertical;
    -webkit-box-orient: vertical;
    overflow-y:scroll;
    -moz-box-sizing: inherit;
    box-flex: 0;
    -ms-box-flex: 0;
    -moz-box-flex: 0;
    -webkit-box-flex: 0;
    -moz-box-lines:multiple;
}

For Firefox, I need the scrolling behavior with overflow:auto, while also preventing the flex box from expanding vertically. Unfortunately, setting box-flex: 0; has not resolved this issue.

If you have any suggestions on how to accomplish this, please let me know!

Answer №1

Encountered a similar issue when dealing with vertical scrolling within a flex box in Firefox. The scrollbar gutters showed up when the content overflowed vertically, but there was no scroll handle and the content box stayed static and unscrollable.

To resolve this problem, I simply added a min-height to the flex box. Even if setting a min-height was not originally necessary, you can use min-height:1px as a workaround.

I have personally only tested this solution on Firefox 13, so results may vary for other versions.

Answer №2

Currently, the behavior of flex boxes in Firefox is somewhat unpredictable and not fully polished. One notable drawback is that they do not function properly when placed under fixed or absolutely positioned elements. It's important to note that in order for flex boxes to behave as expected in Firefox, a specific width must be defined; otherwise, they will default to behaving like inline blocks.

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

Mozilla browser experiencing issues with mouse move event functionality

Here, I have a background image on the body and with the following script, when the user moves the mouse, the image in the background also moves. body { background-image: url('../images/1.png'); background-size: 98%; background-posi ...

Changing Background Color on Div Click

After spending a considerable amount of time on this, I find myself getting confused and stuck. It seems like I might be overlooking something crucial. Essentially, my code is designed to have the default div background (gamebg), and upon clicking one of t ...

Fixing issues in PHP File Editor

At our web development company, we have created an online file editor and file manager script for our website users to easily manage their files and customize their templates. This script is written in PHP and allows users to edit html, text, php, js, jque ...

Full-Width Bootstrap Element

I am looking to design a pattern of alternating colored blocks that span 100% of the screen. An example of the "ideal" layout can be seen in the attached illustration, along with the current layout. Preferred design: Current layout: My initial approach ...

Developing a Customized Filtering Mechanism in Angular 8

I have some experience working in web development, but I am relatively new to Angular. My current project involves creating a simple filter for a table's column based on user input. However, I'm facing an issue where typing in a single letter fil ...

Error occurs with iron-form when the submit button is within a div

I'm encountering an issue when trying to submit an iron-form. The error message I receive is: VM7938:3 Uncaught TypeError: Polymer.dom(...).localTarget.parentElement.submit is not a function This problem only occurs when the submit button is place ...

What is the best way to ensure a jQuery UI slider recognizes when the mouse is released after being clicked?

I have integrated the jQuery slider into my application and am facing an issue with triggering an event to update the database upon releasing the slider. Currently, I am using the following code snippet: $('.ui-slider-handle').mouseup(function () ...

Populate an HTML select with data as users click the create button

Encountering an issue when loading data into an HTML select after users press or click a button. The situation is as follows: A button is available to create another button dynamically Upon clicking the created button, a form is displayed Once the form i ...

Selecting the parent span element using jQuery

Is there a better way to display text in the parent <div>'s <span>? I'm having trouble with using spans and .parent(), any advice would be appreciated. HTML: <div> <span></span> <!--the span where I need to show ...

Change the background color with a click in HTML

Is it possible to include two onclick arguments in a button tag like this: <div id="Spacer" align="center"> <button id="button" onclick="document.getElementById('pop').style.display='block';$('#grayout').toggle ...

Deletion of input is not permitted

Currently, I have a telephone input field on my form that only allows numbers. I have implemented a simple JavaScript code to enforce this validation. However, the issue I am facing now is that the input box cannot be deleted. <form id="aylikal" action ...

Guide on how to extract data from a database using a MySQL query and inputting values from a drop-down menu

In my project, I am faced with the task of selecting a city from a dropdown list and using jQuery to retrieve the people belonging to that city. Here is the code snippet I have implemented: <select class="form-control" id="personCity"> ...

When you adjust the size of your web browser, the text may become distorted in HTML and CSS

My website has a problem with text resizing when the browser window is made smaller. The text gets squashed in the middle and creates more lines than needed. Here is my code: Entire Document HTML: http://pastebin.com/kj1jvTjv CSS: http://pastebin.com/A1C ...

What is the best search engine for static HTML sites that are free from branding and advertisements?

I am in the process of developing a large HTML website with over 12,000 pages and the count is increasing. I am searching for a solution to incorporate search functionality without any advertisements or branding (restricting Google as an option that I alre ...

A dynamic Java web framework that combines RESTful JSON services with the power of HTML5 and jQuery AJAX functionality

As we approach the year 2013, the era of HTML5, jQuery has solidified itself as the go-to standard for web Javascript development. Back in 2010, this link was quite popular: I am searching for a Java web framework that can expose domain classes through R ...

The alignment of the label button within the form-group is being set to the top

While using Bootstrap 4, I encountered an issue with aligning the save button in a form group because there was no label at the same level. Despite trying to follow an example from here, I still had to hard code margin-top to prevent the button from bein ...

Using d3 to showcase pictures sourced from a csv file

Having recently embarked on a journey to learn javascript, d3, and the polymer project, I am facing a challenge that I hope to get some guidance on. After successfully parsing a csv file containing image information and creating an array specifically for ...

How to use multiple class names with Next.js module CSS

Currently, in my project I am utilizing Next.js along with module.css. However, I have encountered an issue. There is a "button" component nested inside another component. I am trying to apply both a normal className and Style.myClass to this button compon ...

Tips for displaying three divs in one row and three divs in another row

I'm aiming for a design with 3 divs in one row and another 3 in the next, like this But what I currently have is different. Can someone assist me in achieving the desired layout? MY HTML : <div class="category-food"> < ...

"Explore stunning images with the power of JavaScript in our

My question involves a div containing five images, displayed in order as [1] [2] [3] [4] [5]. I am looking to create a JavaScript script that will automatically rearrange the images to display them as [2] [3] [4] [5] [1], then [3] [4] [5] [1] [2], and so o ...