Skip to content

Instantly share code, notes, and snippets.

@steroyle
Created May 24, 2019 18:01
Show Gist options
  • Save steroyle/a5794c85dcf95fd43871263adafcbfb2 to your computer and use it in GitHub Desktop.
Save steroyle/a5794c85dcf95fd43871263adafcbfb2 to your computer and use it in GitHub Desktop.
Getting CSS Grid to work in IE
Use the IE prefix:
display: -ms-grid;
-ms-grid-columns: 540px auto;
Although you can use "auto" in grid columes IE doesn't seem to take note of them and only uses up as much space as it needs. You have to give it a fixed pixel value instead.
In order for css grid child elements to display properly on the grid you need to give them specific positions as grid-area doesn't work:
.item-1 {
-ms-grid-row:1;
-ms-grid-column:1;
}
.item-2 {
-ms-grid-row:1;
-ms-grid-column:2;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment