Supporting CSS Grid in Internet Explorer

How to Make CSS Grid Work in IE in 5 Minutes!

Elad Shechter
May 22, 2018 · 3 min read


Most developers are afraid to start using CSS Grid because of browser support, but CSS grid is fully supported in all main browsers: Chrome, Firefox, Safari, Edge including their mobile versions.

The problem we still have, is supporting IE (Internet explorer).
What you might not know, is that CSS Grid was first supported in IE 10.

In this post I will teach you how to support CSS Grid in IE 10 and above, while using the old CSS Grid syntax, without the need to know the old prefixes of IE CSS Grid.

Disclaimer: I’ve checked it on IE 11 (I don’t have real IE 10 to check)

What isn't supported in CSS Grid in IE, and How can you Make It Work?

  • Grid-gap isn’t supported, but you can use CSS margin instead.
  • Grid-template-areas isn't supported, but we can convert it to work with grid lines.
  • Important: the HTML <main> tag doesn’t work with CSS grid. Replace it with <section role=”main”>.

Auto Converting CSS Grid to Support IE CSS Grid

Let’s take these CSS Grid styles that aren’t supported in IE.


grid-template-columns:2fr 1fr;
grid-template-areas:"header header"
"title sidebar"
"main sidebar"
"footer footer";
.site > *{padding:30px; color:#fff; font-size:20px;}

CSS Grid Codepen Demo — Without IE prefixes

Using AutoPrefixer CSS Online Website

Autoprefixer is a postcss tool that reads your CSS, and either adds or removes prefixes, according to a predefined list of supported browsers. They also have an online tool you can use to add prefixes to your snippets.

Now we will copy the code, as it is, to Autoprefixer CSS online.

Notice! when converting grid-template-areas, you have to also convert grid-area along with it, because autoprefixer needs to know the connections between them.


We got CSS that is 100% IE CSS Grid compatible.
You don’t need to understand the IE syntax, the converting is doing a great job!



CSS Grid CodePen Demo — With Support for IE Browsers

Final Words

That’s all,
I hope you’ve enjoyed this short post and learned from my experience.
If you like this post, I will appreciate applause and sharing :-)

More posts on CSS Grid:
CSS Grid for Beginners (Beginner level)
The CSS Grid Methods (Intermediate level)
Becoming a CSS Grid Ninja! (High level)

More posts on CSS:
New CSS Logical Properties!
The New Responsive Design Evolution
CSS Architecture for Multiple Websites With SASS

Who Am I?
I am Elad Shechter, Web Developer specializing in CSS & HTML design and architecture, working at

You are welcome to follow me on Twitter! :-)

You Can find me in my Facebook groups:
CSS Masters
CSS Masters Israel

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store