个人博客三栏css实践

<!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=utf-8" />

<title>个人博客</title> 

<link rel="stylesheet" type="text/css" href="index.css" />

</head> 

<body> 

<div id="top">

  <div >
  <a id="loginbtn" href="index.html" >登录</a>
  </div>
</div>
<div id="banner">
我的个人博客
</div> 

<div id="nav">
<ul>	
	<li><a href="">首页</a>                </li>			
	<li><a href="">博文</a>                </li>				
	<li><a href="">相册</a>                </li>			
	<li><a href="">关于我</a>                                                                </li>		
</ul>
</div> 

<div id="left">
<div id="me">
<center><img src="touxiang.jpg"></center></br>
<center>myblog</center>
</div>

<div id="blogcat">
<center>
<p> 博文分类列表</p>
<ul>
<li><a href="">c++<a></li>
<li><a href="">php<a></li>
<li><a href="">linux<a></li>
<li><a href="">java<a></li>
<li><a href="">嵌入式<a></li>
</ul>
</center>
</div>

<div id="link">

<center>
<p> 友情链接</p>
<ul>
<li><a href="">csdn<a></li>
<li><a href="">51cto<a></li>
<li><a href="">acm<a></li>
<li><a href="">linux<a></li>
<li><a href="">blog<a></li>
</ul>
</center>

</div>
</div>

<div id="main">
<div id="logo">原创			</div>
<div id="title">c++ helloworld</div>
<center>
<div id="content">
#include "iostream.h"</br>
using namepace std;</br>
int main()</br>
{</br>
cout<<"hello world";</br>
}</br>

</div>
</center>
</div> 

<div id="footer">
有问题联系我 QQ
</div> 


</body> 

</html> 



css文件

/* CSS Document */

body,div,ul,li{ 
    margin: 0px; 
    padding: 0px; 
} 

div#top { 
    float:left;
    clear: both;
    height: 50px;
     width:100%;	
    background-color: red; 
	padding: 1px; 
	margin:0px;
} 
#loginbtn {
float:right;
}

#banner{
	float:left;
	width:100%;
height:200px;
background-color: green; 
}
#nav{
	float:right;
    height: 50px; 
	width:100%;
    background-color: red; 
}
#nav ul{
padding-left:300px;
}

#nav ul li{
list-style-type:none;
float:left;
}
#left{
float:left;
width:400px;
height:auto;
background-color: green; 
}
#title{
	
}
#logo{
	
	float:left;
}
#main{
padding: 0px 160px 5px 160px; 
    margin: 0px; 
    background-color: silver;
}
#footer{
clear:both;
margin:10px 0px 0px 0px;
background-color: yellow;
height:200px;
}


  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值