手把手教你做主题 WordPress皮肤教程(二)(4)
来源:asp之家 发布时间:2010-03-22 18:27:00
Step7--内容和定位
新建一个CSS文件,首先要给每一个容器(DIV)做定位,这可能是一个比较难的工作,其实认真做就会感觉也很简单,你只要确定它们的高度;宽度和浮动。
现在要给每一个容器定义CSS属性,首先要明确类名和ID名,还要把相同的属性的字符都找出来。请认真的检查第五步里的HTML文件中的类名。别外说一点,在这里可以用明亮的背景颜色来显示出每个容器的空间。(等到最后一步,可以把这些背景删掉)而背景的图片的尺寸可以从第四步中量出。
以下为引用的内容:
=======================
body
{
margin: 0px;
padding: 0px;
text-align: center;
}
h1, h2, h3, ul, li, p, form
{
margin: 0px;
padding: 0px
}
hr
{
display: none;
}
a{
text-decoration:none;
}
a:hover{
text-decoration:underline;
}
.space
{
clear: both;
}
#page
{
margin: 0px auto;
padding: 0;
width: 960px;
}
#header
{
background:#CCCCCC;
height: 308px;
width: 960px;
text-align: center;
}
#headerimg
{
margin: 0px;
text-align: left;
}
#top_nav
{
background-color:#0066CC;
height: 45px;
padding-left: 105px;
text-align: left;
}
#top_nav ul
{
list-style: none;
}
#top_nav li
{
display: inline;
}
#top_nav li a:hover
{
}
#content
{
background: #009933;
float: left;
text-align: left;
}
.blogcontent
{
float: left;
padding: 10px 0px;
width: 635px;
}
.post
{
text-align: left;
}
.post h2
{
padding: 0px;
}
.post .post_title
{
float: left;
width: 90%;
}
.post_title h2, a
{
padding: 0px;
margin: 0px;
}
.post_title a
{
text-decoration: none;
}
.post_title a:hover
{
}
.post_title small
{
}
.post_title small a
{
padding: 0px;
margin: 0px;
}
.post .postmetadata
{
float: right;
height: 34px;
padding: 12px 5px;
width: 35px;
}
.postmetadata a
{
text-decoration: none;
}
.postmetadata span
{
padding-left:5px;
}
.entry
{
}
.entry a
{
padding: 0px;
margin: 0px;
}
.entry a:hover
{
}
.entry blockquote
{
border: 2px dashed #042748;
}
.entry img
{
float: left;
}
.entry ul
{
}
.entry li
{
}
.entry ol li
{
list-style: decimal;
}
.entry p
{
text-align: justify;
padding: 0px;
}
.entry span
{
}
#sidebar
{
background-color:#6666CC;
float: left;
padding: 0px 20px;
text-align: left;
width: 285px;
}
#sidebar ul
{
list-style: none;
margin: 0px;
}
#sidebar li
{
margin: 0px;
}
#sidebar li h2
{
margin: 0px;
}
#sidebar ul ul
{
list-style: none;
margin: 0px;
}
#sidebar ul ul li
{
margin: 0px;
}
#sidebar ul ul li a
{
}
#sidebar ul ul li a:hover
{
}
.bottom_sidebar
{
background-color:#006666;
float: right;
height: 90px;
width: 310px;
}
#search
{ }
#search input
{
}
#search #searchsubmit
{
background: #b1b1b1;
}
#footer
{
background:#999966;
height: 200px;
text-align: left;
width: 960px;/*909*/
}
#footer .column1
{
background:#FF3333;
float: left;
width: 300px;
}
.column1 .bottom
{
}
.column1 a
{
text-decoration: none;
}
#footer .column2
{
background-color:#006699;
float: left;
width: 250px;
}
.column2 h2
{
}
.column2 ul
{
list-style: none;
}
.column2 a
{
text-decoration: none;
}
================================
编好代码后在你的浏览器中测试效果,在此之前加上必要的图片,最终效果如下:


猜你喜欢
- 相信在自己的网站上使用AdSense的朋友都曾遇到过展示英文广告的情况,即使网页内容全部为中文,即使访问用户全部来自中国或中文区域。虽然出现
- 今天来介绍Godaddy主机用户如何在共享托管帐户上创建新增FTP用户。那Godaddy主机用户为什么需要在共享托管帐户上新增FTP用户?有
- #cccccc 1px dotted; TABLE-LAYOUT: fixed; BORDER-TOP: #cccccc 1px dotte
- 老谢说说在软文企业品牌宣传上的方法,常见的做法就是做电视广告、平面广告等,这类宣传投入固然很重要,也很必须,但一般人对广告都有抗拒排斥心理,
- 网页内容是写给谁看得?这个问题不是客户问我的,而是我提出的。对这个问题的理解和把握,可以看出你对SEO的认识程度。或许很多网站设计者会毫不犹
- 我们都知道windows2003 + IIS6.0下,如果目录结构中有xxx.asp这样的目录,那么所有这个目录下的文件不管扩展名为什么,都
- 11月26日上午消息,据多玩网总裁李学凌在网上公开透露,多玩网遭对手iSpeak恶意攻击一案近日在上海一审判决。iSpeak运营方上海勤和公
- 1、当系统启动显示操作系统列表时, 按F8 出现高级启动选项;a. Safe mode: 只加载基本的服务和驱动。用于解决安装了额外的硬件驱
- 本文介绍了Visual Studio Code(vscode) git的使用,分享给大家,具体如下:1.创建一个github账号  
- 总听高人说做站商业模式很重要。原来一直搞不清楚这个商业模式到底是什么东西,以为就是业务模式、就是怎么赚钱,现在觉得不是。会赚还要会花,商业模
- 最近在学习 python,使用 flask 实现了个个人博客程序,完了想部署到服务器上。因为是新手,一路磕磕绊绊最终把它基本搞定。网上资料对
- Text Link Ads 是一家专门销售博客文字链接的国外联盟,网赚老鸟应该对它并不陌生,很多人靠它很轻松的赚了不少钱,对于网赚新手来说,
- 作为草根的我们,在辛辛苦苦连续奋战几天几夜或更长时间后,自己的网站终于诞生了。他就像自己孩子一样,用自己全部的爱呵护着,培养他长成苍天大树。
- 内容摘要:核心提示:什么样的网站才是好网站,怎样的网站优化才能让用户更喜欢?这里解析企业网站应如何将用户体验与搜索引擎优化相结合
- 今天一个朋友加我QQ谈IP与PV的关系,以下是我个人的理解。有不对的也请指教。个人觉得IP固然重要,但PV更重要,对一个想长久发展的正规站来
- 本文介绍Google和百度两大搜索引擎的网页收录习惯、网页排名习惯等,帮助站长合理优化自己的网页,达到Google百度两面笑的目的。Goog
- 喜欢站群的朋友可以看看了,附送一个查询关键字价格的东东,只要输入首字母就可以了:(huehacker.info/keyword.php)1-
- 2009年CNNIC的闹腾,把中国的CN域名给折腾OVER了,IDC的闹腾,把中国的网站给折腾OVER了,很多站长转战国外,购买国外主机的时
- 无效HTML代码是什么?从字面意思来看,“无效”就是“没有效果”的意思,无效代码是由于标签元素书写错误、标签元素没有闭合等原因,造成页面无法
- 本次教程的前提条件是您得安装好VM软件和Xshell。对应软件的下载请自行百度!如果exe都不会安装,请关闭本页面!第一步、下载镜像阿里云开