When viewed in IE11, each element with { display: table-cell } styling is displayed on a separate line

Here is the HTML code snippet (JSFiddle):

<div class="form-group tabled-contents">
    <div style="display: table-row;">
        <input id="BodyContentPlaceholder_TxtCustomerId" type="text">
        <input id="BodyContentPlaceholder_BtnShowByCustomerId" type="submit" value="Show">
    </div>
</div>

Additionally, here is the accompanying CSS:

.tabled-contents {
    display: table;
    width: 100%;
}

.form-group input[type=text], .form-group input[type=submit] {
    display: table-cell;
    width: 200px;
}

In most browsers like Chrome and Firefox, the inputs are displayed side by side on the same row. However, when viewed in IE11, the second input appears below the first one.

If you have any insights or solutions on why this rendering issue occurs in Internet Explorer and how to fix it to match other browsers, your input would be greatly appreciated!

Answer β„–1

After submitting a bug report to the IE development team, it has been acknowledged as an official issue.

I will provide updates on this thread once there is any progress or change in the bug's status.

Answer β„–2

Solution

insert an empty div element

<div style="width:0;display:table-cell"></div>

Demonstration on Codepen http://codepen.io/vinaymavi/pen/JWjxJb

<div style="display:table">
  <div style="width:0;display:table-cell"></div>
  <div style="display:table-cell;border:1px solid;">
   Cell-1
  </div>
  <div style="width:0;display:table-cell"></div>
  <div style="display:table-cell;border:1px solid;">
    Cell-2
  </div>
  <div style="width:0;display:table-cell"></div>
  <div style="display:table-cell;border:1px solid;">
    Cell-3
  </div>
</div>

For further information, refer to Microsoft's known issue with Internet Explorer

Answer β„–3

To achieve the desired layout, utilize the 'table' display property along with the 'table-row' display property for the wrapping elements. However, refrain from using the 'table-cell' property for the input element. Avoid setting the display property for inline elements to ensure everything functions correctly across different browsers, including Internet Explorer. p.s. - Maintain the semantic structure by keeping the input element uncomplicated and true to its purpose without wrapping it in unnecessary divs or other elements.

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

Balancing icons and text to align perfectly in a straight line

https://jsfiddle.net/magnix2k/z1sx03by/1/ My goal is to make sure that the icons in buttons, along with their labels and accompanying text, are perfectly aligned. Despite trying various CSS codes like 'top: 0;', 'padding: 0;', 'di ...

Revise Swagger UI within toggle button switch

My project aims to showcase three distinct OpenApi definitions within a web application, enabling users to explore different API documentation. The concept involves implementing a toggle button group with three buttons at the top and the Swagger UI display ...

Preloading jQuery Images in Relation to the Present Document

I am looking to create a custom jQuery image preloader that dynamically loads images based on the current document. My plan is to use a jQuery script that combines the current document name and an adjustable imagename/extension. For example, if the curre ...

A demonstration of VueJS Nested Builder functionality

I am currently exploring VueJS and working on a project to create a simple page builder application that allows users to add sections and subsections. I am seeking guidance on how to properly set up the Vue data property for this functionality. Any advice ...

Modifying a variable when a specific number of elements are clicked using jQuery

I have created a script for my portfolio that is functional but I want to streamline it so that I only need to edit the HTML, not the script itself. The main requirements for the code are: Count the number of <img> tags within the element with id ...

Why is my JQuery code refusing to function even though I have coded it correctly?

Encountering an issue with the carousel functionality. The button is supposed to switch between play and pause, triggering the carousel accordingly. However, upon clicking the button, it seems to switch too quickly without properly pausing or playing the c ...

JavaScript pop-up that appears across all applications

An ASP.NET page I've developed in IE is responsible for monitoring multiple server jobs that run overnight. Whenever an error occurs on one of these jobs, a popup window opens using javascript's window.open() function. However, employees often ha ...

Enter the [color] HTML5 code and check for compatibility with all the latest web browsers

I am interested in implementing a color picker functionality using the input[color] element in HTML5. I would like to confirm if this method is compatible with all modern browsers. Additionally, I am curious if there are alternative ways to achieve this, ...

JQuery Slider's Hidden Feature: Functioning Perfectly Despite Being Invisible

Having an issue with a jQuery slider on my local HTML page. The sliders are not showing up as intended. I want it to display like this example: http://jsfiddle.net/RwfFH/143/ HTML <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery ...

Testing the local transmission of form data via Javascript: A Step-by-Step guide

Currently studying how to send forms using JavaScript by manually creating an XMLHttpRequest. Towards the end of the provided example, there's a note: Note: If you want to send data to a third party website, keep in mind that this use of XMLHttpRequ ...

Can a CSS class be designed to have a value that changes dynamically?

Let's say we have some div elements that look like this: <div class="mystyle-10">Padding 10px</div> <div class="mystyle-20">Padding 20px</div> <div class="mystyle-30">Padding 30px</div> Would it be possible to c ...

Div Randomly Transforms Its Vertical Position

After successfully creating a VS Code Extension for code completion, I decided to develop a website as a landing page where users can sign up and customize their extension settings. The editor I built pops up first on the page seemed to be working fine in ...

Pictures are loading fine on a Chrome tab, but are showing a 403 error in the React code

I've been working on a React project that includes images using the img tag. Some of these images are failing to load with a 403 error: https://i.sstatic.net/AmgkF.png Interestingly, these same images load perfectly fine in another tab on Chrome: h ...

The Bootstrap modal is refusing to pop out as intended

My attempt to showcase a modal on ruby on rails has hit a snag. I have set up a view button that should trigger the appearance of the modal when clicked, but it’s not functioning correctly. The issue is evident in this image, where the modal appears dark ...

What is the best way to reduce the spacing between text?

I am trying to figure out how to reduce the spacing between my text so that it aligns like the example below. Take a look at the text "Welcome to my portfolio". Currently, when I run my code, there is a large gap between "Welcome to my" and "Portfolio". ...

Ways to extract only the highest-ranking entries with closely matching values in a designated column?

Imagine we have a DataTable containing 1000 rows. Each row in Col_1 consists of two numbers. Below are the first five records: Col_1 Col_2 10-01 Alex 10-02 John 10-04 Sara 20-07 David 20-09 Will . . . . . . Is there a way to create a filte ...

Make the child DIV's width equal to the width of its parent DIV, even when the parent DIV's width is not

I am experiencing an issue with a dropdown menu. I have created this code (with the assistance of w3schools)... :) The problem is that the sub-division that appears when I hover over a division does not match the width of the parent. I attempted to assig ...

Repainting can be an issue if the child element has not been transformed

My parent map has a large number of children pins, and I am experiencing significant slowdown while panning the map due to continuous repainting. Strangely, this issue is resolved when tapping on a child's pin and transforming the thumbnail inside it. ...

Website experiencing issues with moderating Facebook comments

I recently added a Facebook comments box to my website in the footer. Although it is visible, I am unable to moderate it. Furthermore, the comments are not showing up in the comments queue panel at https://developers.facebook.com/tools/comments. I am us ...

Determining When the Collapse Transition in Material UI 5 is Complete

Snippet <Collapse in={expanded} onTransitionEnd={() => console.log('finished')} > <div>foo</div> </Collapse> Error Detection The callback function (onTransitionEnd) is not triggered af ...