I'm having problems with CSS Grid in IE11. (yah, shocker right?)
I have a grid with 2 columns. The first column is labels for a form and the 2nd column is <input> and <select> elements.
The input elements all have a size attribute to control how long they are. The modern look-and-feel of making all inputs the same width doesn't fit with the look-and-feel of the rest of our software.
This all works in Chrome, but in IE11, the input and select elements are all forced to be the same width.
Here's how it looks. Chrome on the left, IE11 on the right.
Here's an example:
#testParms {
display: -ms-grid;
display: grid;
justify-items: start;
align-items: center;
-ms-grid-columns: max-content;
grid-auto-columns: max-content;
grid-template-areas: "a a";
}
#testParms .labelDiv {
-ms-grid-column: 1;
}
#testParms> :not(labelDiv) {
-ms-grid-column: 2;
}
.row1 {
-ms-grid-row: 1;
}
.row2 {
-ms-grid-row: 2;
}
.row3 {
-ms-grid-row: 3;
}
<div id="testParms">
<div class="labelDiv row1"><label>Label 1</label></div>
<input class="row1" type="text" size="20" />
<div class="labelDiv row2"><label>Label 2</label></div>
<input class="row2" type="text" size="2" />
<div class="labelDiv row3"><label>Label 3</label></div>
<select class="row3">
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
</select>
</div>
Note the labelDiv divs around the labels are there to fix another problem with grids in IE11. If I just put the labels by themselves, they seem to ignore the -ms-grid-row style and all go to row1.
I know I could do this easily with a table, but I'm trying to avoid going that route.
