Streaming live at 10am (PST)

Custom code only for IE


#1

Hi,

I know that IE doesn’t support flexbox, then all the paragraph from the site on IE are not showing well.

I’ve found a fix by using display:block on the div where the paragraph is, but i’d like it to happen only when users are on IE browser.

So i’ve used this code in the head :

<!--[if IE]>
<style type="text/css">
.footer__col {
display:block;
}
</style>
<![endif]-->

<style type="text/css">
@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
.footer__col {
display:block;
}
  </style>
} 

But the flex attributes on the div when using IE are still on, then the block display is not working.

Any ideas about how can i erase thoses flex attributes using IE and make the block display working well?

Sorry for my english tho, hope it’s all clear.

Best regards,

Leo


#2

Hey @Leo_Fabre,

Would be nice to see your site URL, but try adding !important right after display:block

@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) { .footer__col {display:block !important } }

Let me know if this works :slight_smile:

Best,
Blaise


#3

Hi Blaise,

Thanks for the quick reply!

I can’t now, but i’ll give it a try in the evening, and i’ll tell you more about it, many thanks.

Leo