Heim >Web-Frontend >HTML-Tutorial >css右边乱跑了?_html/css_WEB-ITnose

css右边乱跑了?_html/css_WEB-ITnose

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-24 11:55:47971Durchsuche

CSS代码:

a {color:#252525; text-decoration:none;}a:visited {text-decoration:none;}a:hover {color:#ba2636;text-decoration:underline;}a:active {color:#ba2636;}.bigBox {margin: 0 auto; width: 850px;margin:auto;clear:both;}.left {padding:5px; float: left; width:65%;background:#FFF;height:300px;margin:auto;border-radius: 5px;border:1px solid #e1e2e3;clear:both;}.right {clear:both;float: right; width: 32%;background:#F7f7f7;height:300px;margin:0px;padding:0px;word-break:break-all;}.div_right{padding:5px;}


<div class="clear"></div><div class="bigBox clearfix">    <div class="left">左边</div>    <div class="right"><div class="div_right">如何在右边?如何在右边?如何在右边?如何在右边?如何在右边?如何在右边?如何在右边?如何在右边?</div></div></div><div class="foot"></div>


******** 结果是这样了?***********




请问怎么样才能把右边的调到和左边的平行的位置呢?谢谢。


回复讨论(解决方案)

clear:both; 去掉
.right {
float: right; width: 32%;
background:#F7f7f7;
height:300px;
margin:0px;
padding:0px;
word-break:break-all;
 
}

Stellungnahme:
Der Inhalt dieses Artikels wird freiwillig von Internetnutzern beigesteuert und das Urheberrecht liegt beim ursprünglichen Autor. Diese Website übernimmt keine entsprechende rechtliche Verantwortung. Wenn Sie Inhalte finden, bei denen der Verdacht eines Plagiats oder einer Rechtsverletzung besteht, wenden Sie sich bitte an admin@php.cn