css常用布局样式
1.一行三列
<!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" lang="gb2312">
<head><title>css布局:一行三列</title>
<link rel="stylesheet" href="css/03_3columnplustopbox.css" mce_href="css/03_3columnplustopbox.css" type="text/css" media="all" />
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<meta name="robots" content="all" />
<meta name="author" content="Owen Briggs:www.w3cn.org" />
</head><body>
<div id="top">
<p>top</p>
</div>
<div id="left">
<p>left</p>
</div>
<div id="middle">
<pre>
#top {
margin: 20px 20px 0px 20px;
padding: 10px;
border: 5px solid #666;
background: #FFF;
height: 100px; /* ie5win fudge begins */
voice-family: "\"}\"";
voice-family:inherit;
height: 70px;
}
html>body #top {
height: 70px; /* ie5win fudge ends */
}
#left {
position: absolute;
top: 120px;
left: 0px;
margin: 20px;
padding: 10px;
border: 5px solid #666;
background: #FFF;
width: 150px; /* ie5win fudge begins */
voice-family: "\"}\"";
voice-family:inherit;
width: 120px;
}
html>body #left {
width: 120px; /* ie5win fudge ends */
}
#middle {
margin: 20px 190px 20px 190px;
padding: 10px;
border: 5px solid #666;
background: #FFF;
}
#right {
position: absolute;
top: 120px;
right: 0px; /* Opera5.02 will show a space
at right when there is no scroll bar */
margin: 20px;
padding: 10px;
border: 5px solid #666;
background: #FFF;
width: 150px; /* ie5win fudge begins */
voice-family: "\"}\"";
voice-family:inherit;
width: 120px;
}
html>body #right {
width: 120px; /* ie5win fudge ends */
}
</pre>
<div align="right"><p><a href="css/03_3columnplustopbox.css" mce_h
相关文档:
.
Transparent
{
width
: 16px
;
height
: 42px
;
background
: transparent
url(images/transparent.png)
no-repeat
;
}
*
html
.
Transparent
{
&nbs ......
1. document.formName.item("itemName") 问题
说明:IE下,可以使用document.formName.item("itemName")或document.formName.elements["elementName"];
Firefox下,只能使用document.formName.elements["elementName"].
解决方法:统一使用document.formName.elements["elementName"].
2.集合类对象问题
说明:IE下,可 ......
网页切图过程中div+css命名规则
内容:content/container 导航:nav 侧栏:sidebar
栏目:column 标志:logo 页面主体:main
广告:banner 热点:hot 新闻:news
下载:download 子导航:subnav 菜单:menu
搜索:search 页脚:footer 滚动:scroll
版权:copyright 友情链接:friendlink 子菜单:sub ......
一、css优先于位置也有关系
.vm与.vb 样式的定义在优先级别上是相同的,但是如果在html属性里class="vm vb"定义的话优先级并不是写在属性里的顺序,而是写在样式里顺序来决定的。如下的例子
<mce:style><!--
.vm{vertical-align:middle} /* 由于位置原因优先于vb*/
.vb{vertical-align:baseline}
--> ......
在网站设计的时候,应该注意css样式兼容不同浏览器的问题,特别是对完全使用DIV CSS设计的网页,就应该更注意IE6 IE7 FF对CSS样式的兼容,不然,你的网页可能会和你理想的效果相去十万八千里!海量权威开发资料。
所有浏览器 通用
height: 100px;
IE6 专用
_height: 100px;
IE6 专用
*height: 100px;  ......