IE7 CSS trouble
When you meet trouble with css style in IE7, try this. You can set different css for IE7 and the other browsers.
<!--[if IE 7]>
<link rel="stylesheet" type="text/css" href="/home_c_ie7.css" mce_href="home_c_ie7.css" />
<![endif]-->
相关文档:
abc.css
CSS code
.class1
{
width:10px;
background-color: red;
}
HTML code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<link rel="stylesheet" type="text/css" href="abc.css" />
<TITLE> New Document </TITLE>
<script&g ......
css布局的时候多多注意一下,相信很快就可以掌握了css布局的技巧!
一、IE边框若显若无,须注意,定是高度设置已忘记;
二、浮动产生有缘故,若要父层包含住,紧跟浮动要清除,容器自然显其中;
三、三像素文本慢移不必慌,高度设置帮你忙;
四、兼容各个浏览须注意,默认设置行高可能是杀手;
五、独立清除浮动须铭记 ......
-----------------------------------------------
链接外面文件css
<link href="layout.css" rel="stylesheet" type="text/css" />
-----------------------------------------------
写文本 : <div id="mainContent">
<p>1列固定宽度居中+头部+导航+尾部—&mdash ......