首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > CSS >

如何样设置只让网页两边的空白部分加下背景

2012-09-07 
怎么样设置只让网页两边的空白部分加上背景怎么样设置只让网页两边的空白部分加上背景,中间的背景颜色不变

怎么样设置只让网页两边的空白部分加上背景
怎么样设置只让网页两边的空白部分加上背景,中间的背景颜色不变。

[解决办法]
描述不够详细啊..是这个意思不:

HTML code
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en">    <head>        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />        <title>HTML</title>        <meta name="author" content="admin" />        <!-- Date: 2012-08-09 -->        <style type="text/css">        body{            background-image: url("http://www.zastavki.com/pictures/1280x1024/2008/Photoshop_Wolf_005239_.jpg") ;            background-repeat: repeat-x;        }        div{            height:100%;width:800px;border-left: 1px solid #000;border-right: 1px solid #000;position: absolute;background-color:#ddd;left:25%;        }        </style>    </head><body><div></div></body></html>
[解决办法]
网站的css代码
body和#wrap改成你想要的背景或颜色就行了
CSS code
body{font:12px/18px 宋体;color:#494949;background-color:#000  }#wrap{width:994px;margin:0 auto;background-color:#fff} 

热点排行