想要修复没有高度属性的问题

时间:2014-05-12 09:18:41

标签: css

我有一个div并且在它里面实现了一个图像滑块。我没有为此提供高度,因为我想让这个响应。但是底部div与此配对。我知道它的高度问题。如何我用顶部div的高度来解决这个问题

<div class="img_box">
  <div class="banner_controls"></div>
<div class="banner_slider ">
  <a onclick="javascript:void(0);" href="javascript:void(0);">
<img title="" alt="" src="images/cafe_sierraimg_bannerimg1.jpg" />
</a>
<a onclick="javascript:void(0);" href="javascript:void(0);" >
<img title="" alt="" src="images/cafe_sierraimg_bannerimg2.jpg" /> 
</a>
  </div>
</div>

底部div

<div class="small_box_green"> <span class="arrow_default right"></span> <span class="triangle_greentop"></span>
    <h2>Join us!</h2>
    Enjoy California 
    Continental Pacific Rim and Chinese dishes at our award-winning Café Sierra in a light and breezy setting for breakfast, lunch and dinner.</div>

CSS

.img_box {
    height: auto;
    padding: 0;
}

.small_box_green {
    -moz-hyphens: auto;
    background: none repeat scroll 0 0 rgba(164, 179, 81, 0.7);
    color: #FFFFFF;
}

0 个答案:

没有答案