Question

I have a gallery in which i'm using the figure and figcaption tags. This displays fine in all modern browsers but in IE8 it breaks the CSS for the figure and figcaption tags because the browser doesn't support them. Just including the html5shiv library doesn't fix it. Is there a method within that I would have to call?

Was it helpful?

Solution

the problem was that the figure element did not automatically size to the picture it contained so it needed to be specifically set in the CSS

OTHER TIPS

I ran into this same issue and found that it stemmed from specifying max-width: 100% for img elements. If I remove this declaration, IE8 renders the images at the appropriate sizes. Unfortunately, it means they won't responsively size on smaller screens. The best solution I know of is to specify max-width: none using a conditional comment that's applied only in IE8 and earlier:

<!--[if lt IE 9]>
   <style rel="stylesheet">
      img {max-width: none;}
   </style>
<![endif]-->

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top