在我的网站上http://goo.gl/BcJtC“关于我们”部分我想在我的activity-left
div的右侧使用细灰色边框,与activity-right
div分隔开。 不幸的是,使用我当前的代码它不起作用。任何想法?
感谢未显示CSS右侧边框
HTML代码:
<div class="section" id="plan-activite">
<div id="activity-container">
<div id="activity-left"><span class="activity-title">About Us</span><br /><img src="images/planet-water.jpg" class="activity-planet" alt="Picture" /></div>
<div id="activity-right"><p><span class="activity-conclusion">XYZ, khkhkhk, ren natur</span></p><br /><p>XXZ AS was founded 2011sdqsd.</p><br/>
</div>
</div>
</div><!--END page3-->
CSS代码:
#activity-container {
width:90%;
background-color:#FFFFFF;
Height:400px;
margin-left: auto;
margin-right: auto;
opacity:0.95;
filter:alpha(opacity=95); /* For IE8 and earlier */
border: 1px solid #efefef;
background: #fff;
-webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
-moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.27), 0 0 40px rgba(0, 0, 0, 0.06) inset;
}
#activity-left {
color:#000;
margin: 0 auto;
border-style:solid;
border-right-color:#666;
padding:15px;
width: 30%;
float: left;
position: relative;
}
#activity-right {
font:12px 'Open Sans', "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
font-weight:400;
margin: O auto;
padding:15px;
color:#000;
width: 60%;
float: left;
position: relative;
text-align:justify;
-moz-column-count: 1;
-moz-column-gap: 1.5em;
-moz-column-rule: 1px solid #c4c8cc;
-webkit-column-count: 1;
-webkit-column-gap: 1.5em;
-webkit-column-rule: 1px solid #c4c8cc;
}
.activity-planet {
text-align:center;
margin-top:20px;
margin-left:20px;
}
很好 - 谢谢! – Greg 2012-07-29 17:07:11
实际上,只是注意到边框不会一直向下(底部有几个px)。你会知道如何解决这个问题吗? (你可以看看链接 - 已经上传了一个新版本)谢谢 – Greg 2012-07-29 17:14:32
这是因为#活动权不像包含div那么高,在它的高度添加几个像素直到它工作(或者,使用高度:100%;与包含的div具有相同的高度 – Andy 2012-07-29 17:16:08