IE8正在向HTML5< main>添加尾随斜杠。标签 [英] IE8 is adding a trailing slash to an HTML5 <main> tag

查看:125
本文介绍了IE8正在向HTML5< main>添加尾随斜杠。标签的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站是Drupal 7安装。基本上,< main> 标签在某个时候变成< main /> ,这样会破坏网站的在这些浏览器中布局。一切都是最新的。我正在使用一个基于SquareGrid的主题。

My site is a Drupal 7 installation. Basically the <main> tag is at some point become <main/>, and this breaks the site's layout in those browsers. Everything is up to date. I am using a SquareGrid-based theme.

这个问题用来影响IE8中更多的HTML5元素,但是我安装了Respond.js模块,大多数。

This problem used to affect even more HTML5 elements in IE8 and lower, but then I installed the Respond.js module, which fixed the majority.

您可以在IE8中看到问题: http://www.shototechnologies.com/content/shotolab-channel-setup-page

You can see the problem in IE8 at http://www.shototechnologies.com/content/shotolab-channel-setup-page

非常感谢!

推荐答案

这是因为IE8不支持HTML5元素。并且因为它不能将< main> 元素理解为有效的HTML元素,所以它会自动关闭它。

That's because IE8 doesn't support HTML5 elements. And because it doesn't understand the <main> element as a valid HTML element, it auto closes it.

您将需要使用 HTML5垫片,或将 c> class =main的标签包装在一个div中,作为 fallback

You will either need to use an HTML5 shim for IE<9 or wrap the tag in a div with class="main" as a fallback.

这篇关于IE8正在向HTML5&lt; main&gt;添加尾随斜杠。标签的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆