<a href=”http://css.jorux.com/wp-admin/post.php#” >Portfolio</a> –
<a href=”http://css.jorux.com/wp-admin/post.php#” >Contact Us</a> –
<a href=”http://css.jorux.com/wp-admin/post.php#” >Terms of Trade</a>
</div>
Copyright © Enlighten Designs
Powered by <a href=”http://www.enlightenhosting.com/” >Enlighten Hosting</a> and
<a href=”http://www.vadmin.co.nz/” >Vadmin 3.0 CMS</a></div>
刷新你的页面,你将看到如下所示:
最后我们回到内容部分:用<h2<>表现内容标题–"About","Contact us";用<p>表现段落;用</br>断行。
复制代码
<div id=”content”>
<h2>About</h2>
<p><strong>Enlighten Designs</strong> is an Internet solutions provider that specialises in
front and back end development. To view some of the web sites we have created view our
portfolio.</p>
<p>We are currently undergoing a ‘face lift’, so if you have any questions or would
like more information about the services we provide please feel free to contact us.</p>
<h2>Contact Us</h2>
<p>Phone: (07) 853 6060
Fax: (07) 853 6060
Email: <a href=”mailto:info@enlighten.co.nz” >info@enlighten.co.nz</a>
P.O Box: 14159, Hamilton, New Zealand</p>
<p><a href=”http://css.jorux.com/wp-admin/post.php#” >More contact information…</a></p>
</div>
刷新页面可以看到在Content层中又出现一些空白,这是由于<h2><p>标签的默认边距(margin)造成的,我 们必须消除这些恼人的空白,当又不想把网页中所有的<h2><p>标签地边距都设为0,这就需要使用css的子选择器 ("child css selector"),在html的文件结构中,我们想控制的<h2><p>标签(child)是属于#content层 (parent)的,因此在css文件中写入:
[/code]#content h2 {
margin: 0;
padding: 0;
}
#content p {
margin: 0;
padding: 0;
}
[/code]这样我们就告诉浏览器,仅仅是隶属于content层的<h2><p>标签的margin和padding的值为0!
第六步:页面内的基本文本的样式(css)设置:
你是不是厌倦了那些大红大绿的背景,现在是去掉它们的时候了,只保留导航条的红色背景。真是难为您居然能坚持学习本教程到此,很好,再过几步,你就能很好了解css控制整个网页版面(Layout)的能力。
–言归正传–
先设置全局的文本样式:










