【发布时间】:2011-12-14 17:01:42
【问题描述】:
我正在尝试让我的网站在 ie6 和 ie7 上正常显示,他们说您必须使用以下语句:
<!--[if IE 6]> <link href="ie6.css" rel="stylesheet" type="text/css"> <![endif]-->
现在我应该在我的 HTML 页面中的什么位置放置这个语句?
编辑:
所以我在 doctype 之后添加了这个:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org
/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--[if lt IE 7]><html class="ie6" lang="en"><![endif]-->
<!--[if IE 7]><html class="ie7" lang="en"><![endif]-->
<!--[if IE 8]><html class="ie8" lang="en"><![endif]-->
<!--[if gt IE 8]><!--><html lang="en"><!--<![endif]-->
<head>
在我的样式表 ie6.css 我有这个:
.ie6 #magazine_style_left {
position:relative;
float:left;
width:150px;
font-family:Georgia, "Times New Roman", Times, serif;
font-size:14px;
color:#999999;
font-style:italic;
line-height:18px;
}
.ie6 #magazine_style_right {
position:relative;
float:right;
width:519px;
border-left: 1px solid #F2F2F2;
}
我已经在同一页面上添加了 css,但它仍然无法正常工作。就像它没有拿起/使用 ie6 css
【问题讨论】:
标签: html css internet-explorer-7 internet-explorer-6