CSS ID能选择容器内的元素,类不能
比如:
<div class="row" id="form_domain_container">
<label for="domain">域名:</label>
<input name="domain" value="<{$do->domain_name|escape}>" type="text" id="domain" size="35" maxlength="64" /><br />
<{include file='lib/error.tpl' error=$do->getError('domain_name')}>
</div>
在CSS中设置属性可以:
#form_domain_container input{}
但不可以:
.row input{}
相关文档:
我在www.c09.com 发表了这个笔记并上传了原著的PDF,今天有空,转到BLOG上来。
第七章 布局
所有CSS布局技术都依赖于三个基本概念:定位、浮动和空白边操纵
7.1 让设计居中[code]
<body>
<div id='wrapper'>
</div>
</body>
/*最明了的居中方案,可惜IE6不支持*/
#wrapper{
  ......
一:直接设置
二:画面上设置:
如:
<mx:Style>
TextArea{
font-size:36px
font-weight: bold
}
</mx:Style>
三:使用外置文件
<mx:Style source="style.csss"/> ......
一组嵌套选择器的实际特性可以计算出来。基本的,使用ID选择器的值是100,使用class选择器的值是10,每个html选择器的值是1。
它们加起来就可以计算出特性的值。
p的特性是1(一个html选择器)
div p的特性是2(两个html选择器)
.tree的特性是10(1个class选择器)
div p.tree的特性是1+1+10=12,(两个html选择器 ......
test.html:
<html>
<head>
<link rel="stylesheet" type="text/css" media="screen" href="c.css" mce_href="c.css" />
</head>
<body>
<div id="footer2">
this is a footer2 div
</div>
<p id=&qu ......