在Internet Explorer 8中生成内容的文本对齐 [英] Text-alignment of generated content in Internet Explorer 8

查看:80
本文介绍了在Internet Explorer 8中生成内容的文本对齐的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在调试此网站,并尝试解决Internet Explorer中出现的一些问题(大惊喜)

I'm debugging this site and trying to sort out some issues that arise in Internet Explorer (big surprise).

我在几个链接中添加了一个子标题,如下所示:

I'm adding a sub-title to several links as follows:

.subtitle a:after {
    content:"The Subtitle Here";
}

在所有现代浏览器(和IE9)使用 text-align:center; 。但是,在IE8中,字幕在这里被清空。

On all modern browsers (and IE9) the content is center aligned because the container uses text-align:center;. However, in IE8 "The Subtitle Here" is flushed left.

有什么办法控制CSS吗?

Is there any way to control that with CSS?

感谢。

推荐答案

结果你可以轻松做到:

我添加了另一个定位添加内容的样式规则...

I added another style rule that targets the added content...

.subtitle a:after {
    text-align:center;
}



我想IE9和其他浏览器继承了 align 属性为:之后内容,但IE8不。 IE总是让它有趣...

I guess IE9 and other browsers inherit the text-align property for :after content but IE8 doesn't. IE always keeps it interesting...

这篇关于在Internet Explorer 8中生成内容的文本对齐的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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