
我想弄个页眉是有背景颜色的,但是文字分两部分各自占住两边,但不是最边,怎么用CSS写啊,求大神
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励30(财富值+成长值)
3个回答
展开全部
发个图出来看看
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<!-- html -->
<div class="header">
<div class="leftDiv">
<p>某穆某某某某</p>
<p>某穆某某某某</p>
</div>
<div class="rightDiv">
<p>谁谁谁谁谁</p>
<p>谁谁谁谁谁</p>
</div>
</div>
/* css */
.header { width:100%; height:35px; background-color:#333; overflow:hidden; }
.leftDiv { float:left; width:300px; height:35px; margin-left:20px; border:1px solid #999; }
.rightDiv { float:right; width:300px; height:35px; margin-right:20px; border:1px solid #888; }
//是要这种的么
<div class="header">
<div class="leftDiv">
<p>某穆某某某某</p>
<p>某穆某某某某</p>
</div>
<div class="rightDiv">
<p>谁谁谁谁谁</p>
<p>谁谁谁谁谁</p>
</div>
</div>
/* css */
.header { width:100%; height:35px; background-color:#333; overflow:hidden; }
.leftDiv { float:left; width:300px; height:35px; margin-left:20px; border:1px solid #999; }
.rightDiv { float:right; width:300px; height:35px; margin-right:20px; border:1px solid #888; }
//是要这种的么
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
<style type="text/css">
.top{ width:100%; height:30px; background:#0CF;}
.top dl{ width:1000px; margin: 0 auto;}
.top dt{ float:left;}
.top dd{ float:right;}
</style>
<div class="top">
<dl>
<dt>左边</dt>
<dd>右边</dd>
</dl>
</div>
.top{ width:100%; height:30px; background:#0CF;}
.top dl{ width:1000px; margin: 0 auto;}
.top dt{ float:left;}
.top dd{ float:right;}
</style>
<div class="top">
<dl>
<dt>左边</dt>
<dd>右边</dd>
</dl>
</div>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询