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 ......
html部分
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>XHTML ......
Alert{
backgroundColor: #2791DB;
headerColors:#2791DB,#2791DB;
borderThicknessLeft:0;
borderThicknessRight:0;
borderThicknessTop:0;
font-size:14;
buttonStyleName: myCustomButtonStyleName;
}
.myCus ......
-----------------------------------------------
链接外面文件css
<link href="layout.css" rel="stylesheet" type="text/css" />
-----------------------------------------------
写文本 : <div id="mainContent">
<p>1列固定宽度居中+头部+导航+尾部—&mdash ......
jsp页面调用 <link type="text/css" rel="stylesheet" href="css/style.css"/>样式表
其他样式都可以再页面正常显示
.button-qingchu{background:url(images/qingchu.jpg); width:70px; height:30px; border:0px;} 像这样的背景图片样式就显示不出图片是什么问题! Myeclipse 6.5
在html中都可以显示 在jsp中显示 ......