Flexie causing display issues in Chrome with div elements, while Internet Explorer displays correctly

My goal is to arrange 3 divs side-by-side, with any additional divs being pushed to the next row. The jsFiddle example I found works perfectly in IE, but in Chrome, only the parent div (box-wrap) is visible. Check out the demo here.

Removing "float:left;" from the #box-wrap-inner div makes all the divs appear, but the 4th div ends up outside the parent container on the far right instead of being displayed below div 1. Take a look at demo 2 here.

In IE, however, the 4th div is correctly positioned below div 1, as shown in the screenshot below. What could be causing Chrome to not render the divs properly when "float:left;" is included?

The key HTML code snippet is:

<div id="box-wrap">
            <div id="box-wrap-inner">
                <div id="box-1">Box 1</div>
                <div id="box-2">Box 2</div>
                <div id="box-3">Box 4</div>
                <div id="box-3">Box 3</div>
            </div>
</div>

and the troublesome CSS code is:

#box-wrap-inner div {
    float:left;
    margin: 10px;
    width: 32%;
    height: 200px;
    background: #f8f8f8;
    border: 1px solid #8ec1da;
    text-align: center;
    line-height: 50px;
}

Any assistance would be greatly appreciated! Thank you

Functioning correctly in IE

Answer №1

The reason why it's not working is because of the following code being used:

#box-wrap-inner {
    /* Display Box */
    display: -moz-box;
    display: -webkit-box;
    display: -ms-box;
    display: box;
}

To make it work on Chrome, simply remove display: -webkit-box; like this:

For a demonstration, you can view it on JSFiddle.

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

What is the correct way to show a PHP script as an HTML page following an AJAX call?

Attempting to utilize AJAX to call a php file that will display an html page from my js. Below is the php file in question: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv=& ...

Is there a way to determine the names of the functions that are being called?

I'm working on mastering Google Development Tools. Is there a way to determine which specific functions, especially those in Javascript, are needed before a page can load successfully? ...

When extracting a value from an HTML textarea that contains multiple lines of text inputted by the user, the JSON becomes invalid

Here is the JSON format I am working with: { questionID: int studentAnswer: "String" } The issue I am facing is that the studentAnswer field is currently only capable of holding input from a single line in an HTML textarea. If I input text that spa ...

Bottom div refuses to adhere to the bottom of the page

I need help with creating a footer div that sticks to the bottom, left, and right of the page. The current footer doesn't extend all the way down and left. How can I resolve this without using "position: fixed;"? Below is the code snippet (I have rep ...

Transform the HTML content into a JSON format file

I'm currently developing an online marketplace and trying to convert all product information like name, price, and description into json format. I have a sample code featuring a selection of products displayed in rows. <div class='cakes'& ...

Using Jquery to iterate through and show JSON information within a textarea

After making a call with getJSON, I am receiving the data stored in a variable named results. Below is an example of the retrieved data: { "ok": true, "messages": [ { "text": "Message 1", "username": "bot", ...

Ensure that the footer remains fixed at the bottom of the grid at all times

Hello everyone, I am trying to make sure that the black line in my footer always stays at the bottom, regardless of the size of the monitor. I am using a grid-based CSS. I'm not sure if the issue lies within the body? /* GRID BASED ([{"media":"defau ...

Using JavaFX to create a TreeTableView with nodes of varying sizes

I need assistance with styling TreeTableViews and their rows. I have set up a treetableview showcasing objects named Component, divided into classes A, B, and C. In my setup, B objects are nested within A, and C objects are nested within B objects. While I ...

The fusion of Combining Forms, JSON, AJAX, PHP, and Google graphs

I'm completely new to integrating JScript, Ajax, and Google Graphs. Although I've managed to get each of them working separately, combining them has proven to be quite challenging. Google Graph Part of my code (Form is inactive here): <html& ...

Tips for managing a Yes No dialogue box that appears when a button is clicked with JavaScript

When the user clicks on the update button in my form, I want to prompt them with a message asking if they want to delimit the record using Yes and No buttons. If they click on Yes, then the code to delimit the record should be executed; otherwise, just upd ...

What is the best way to customize the styles of an autofilled input in Chakra UI?

Currently, I am customizing the styling of my input fields using Chakra UI's extendTheme function. However, I have encountered a challenge with styling inputs that have been auto-filled. The :autofill pseudo selector does not seem to work as expected ...

Styling the right button of the split button in jQuery Mobile version 1.4.0 using CSS

I was attempting to create a listview with list items that have a button on the right side, much like a jQuery Mobile split button listview. However, I only want the right button to be clickable. The left part of each item should contain a label along with ...

Using jQuery/AJAX for conducting multiple searches in MySQL

I have created a form where users can input their Name, region, age, and language. I've written a PHP script to retrieve this data but encountered an issue - if a field is left empty or the user starts typing a name and deletes it, the database return ...

Transferring Python Data to Django Templates and Utilizing Jquery

One situation that frequently arises for me is having to juggle different pieces of data between Python and Jquery. For instance, I recently encountered an issue where I had a box displaying partial data from Python, but needed to calculate the length of t ...

I am curious as to why the Bootstrap 4 dropright selected menu appears as a default browser button in Chrome, while it functions seamlessly in Firefox

An issue has been identified that is specific to Chrome. The dropright selected menu appears differently in Chrome compared to Firefox, where it displays correctly with a white background. !https://i.sstatic.net/BulRA.jpg The Bootstrap version being used ...

The mobile view does not allow scrolling in the dropdown menu

I recently created a webpage using Bootstrap 4 beta with a dropdown menu in the navbar. While it displays perfectly on my laptop in fullscreen mode, there seems to be an issue when viewed on my iPhone. The dropdown menu only shows 7 out of the 9 links. Is ...

What is the best way to create a responsive layout using bootstrap or HTML and CSS without relying on JavaScript?

Explaining the issue in words is a bit challenging for me as English is not my first language. Please take a look at the image I have linked below for a better understanding of my problem. https://i.sstatic.net/68zan.jpg Currently, I am utilizing bootstr ...

Is it possible to extract a div from a third-party domain and showcase it on my website?

Trying to integrate content from my Veetle.com channel onto my personal website has proven to be quite the challenge. Initially, I attempted to modify an iframe with CSS to display only the schedule information, but encountered limitations due to using 3rd ...

The scriptData parameters are not being successfully transmitted by Uploadify

I am currently utilizing the Uploadify script on my website and attempting to customize the scriptData parameter based on certain form fields. Below is the HTML/JS code: <script type="text/javascript"> function UploadFile() { $('#f ...

Create a fixed content scroll effect with an inset box-shadow

I recently stumbled upon a solution at Stack Overflow that effectively created an inset box shadow beneath content. However, I encountered an issue when the outer container div needed to be scrolling due to overflow - the inner div with the box shadow woul ...