div 的高度延伸到父 div 的高度?

The height of a div extending to height of parent div?

在此网页上http://wuwoclientlindsay.wuwomedia.com/activelist_demo/

div.slider-box 正在扩展到父 div 的高度。我想让它变小。它似乎不是 css 效果,所以我认为这是一个 js 效果,但我无法弄清楚是什么导致它以及调整它的最佳方法。

<div class="slider-box">            
    <h2>Find Activities for Kids in Hertfordshire</h2>
        <form method="GET" action="pet-sitters/pet-sitter-jobs/">
            <div class="form-group">
                <input type="text" id="search_location" class="form-control" name="search_location" placeholder="Any location in Hertfordshire ">
            </div>
            <div class="form-group">
                <button type="submit" class="btn btn-success btn-block">Search</button>
            </div>                  
        </form>
    </div>

我刚刚查看了该网站,发现有一个简单的修复方法

.slider-box {
    position: absolute;
    left: auto;
    right: 24px;
    bottom: 24px;   <!-- REMOVE THIS OR CHANGE MAKE IT bottom: auto !important; -->
    top: 24px;
    width: 344px;
}

如果您将位置设置为绝对位置并同时设置底部和顶部,它会缩放内容大小以适应它。

这样就可以了。