谁帮我看看这段css有什么问题。问什么用的float:left 为什么左中右三块不能显示在一行。。最右边的那块

最右边的那块总是跑到下面去,,,浮不上来啊。。为什么#focus_center{width:405px;margin-left:8px;background:url(/d... 最右边的那块总是跑到下面去,,,浮不上来啊。。为什么
#focus_center{ width:405px; margin-left:8px;

background:url(/deyi_img/pic/topline_bg.png) no-repeat;

border:#D9DFEA solid 1px; padding:9px 10px 0 10px;}

#focus_center dl{ overflow:hidden;}

#focus_center dl dt{ overflow:hidden; zoom:1;}
#focus_center dl dt span{ float:right;}

#focus_center dl dd{ overflow:hidden; padding:14px

0;}

#focus_center h3{ color:#666666; margin:0;

padding:0; line-height:20px; font-size:15px; text-align:center; }
#focus_center h3 a{ color:#F25D08;}

#focus_center p{ color:#666666;

font-size:12px; line-height:20px; margin:12px 5px; }
#focus_center p a{ color:#8295B9;}

#focus_center ul{ background:#fff;}
#focus_center ul li{

line-height:25px; font-size:14px;}
#focus_center ul li span{

float:right; font-size:12px;}
#focus_center ul li span a{

color:#999;}
#focus_center ul li a{

color:#333;}
#focus_center ul li

a.cl_topic{ color:#F25D08;}
展开
 我来答
百度网友0a429b4
2012-04-19 · TA获得超过105个赞
知道小有建树答主
回答量:211
采纳率:55%
帮助的人:94.6万
展开全部
没看明白你是哪三部分要显示在一行
一般情况下要三块显示在一块是要用到float
首先你要定义一个整体的宽度,然后每个浮动部分也要定义宽度,如果最右边那部分被挤下来了应该就是宽度的问题!例如:
.wrap{
width:900px;
}
.wrap .left{
float:left;
width:300px;
height:200px;
background:#000;
}
.wrap .middle{
float:left;
width:300px;
height:200px;
background:#ff0000;
}
.wrap .right{
float:right;
width:300px;
height:200px;
background:#00ff00;
}

<div class="wrap">
<div class="left"></div>
<div class="middle"></div>
<div class="right"></div>
</div>
追问
我在笔记本电脑上显示正常,在台式机上显示就不正常。。那个代码有点长。所以发布出来。。。
aasiheng
2012-04-18
知道答主
回答量:48
采纳率:0%
帮助的人:24.8万
展开全部
建议你换一下 左端三行~
追问
#focus_right{ width:220px; float:left; }

#focus_right p{ background:url(pic/s.gif) 0 -300px

no-repeat; height:88px; margin:0; padding:0;}
#focus_right p a{ width:95px; height:30px;

margin:7px; display:inline-block; float:left; color:#fff;

这是右边那块的css
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式