0

这是我的 HTML(或访问luxury-decor.co.uk)

<div class="wrapper">
    <div class="box_left">
        <p>Providing only the highest quality service work, both internal and external, in Reading, London and surrounding areas. We provide a bespoke service for any areas such as boardrooms, offices, showrooms, hotel lobby's, reception areas, bathrooms, wet rooms,
            kitchens and living areas. We specialise in Venetian Marble Plastering, Painting and Decorating, and both Wall & Floor Tiling. Our decorators are meticulous in what they do and we always strive to adhere to our customers needs. So whatever your project
            is, get in touch with us via email or telephone to discuss your requirements.
        </p>
    </div>
    <!--#box_left-->
    <div id="gallery_container1">
        <script type="text/javascript">
            jQuery.flashgallery('color_chart/gallery.swf', 'color_chart/config.xml', {
                width: '100%',
                background: '#000000'
            });
        </script>
    </div>
    <!--#gallery_container1-->
</div>
<!--#wrapper-->

现在,如您所见,当这样设置时,右侧的图片库太大了。是否有可能使“包装器”内的 div 具有相同的高度?我确实遇到了这个http://www.cssnewbie.com/equalheights-jquery-plugin/#.UUBcyhw0xnM但我对 jQuery 不太好,无法让它工作。有任何想法吗?

4

3 回答 3

0

识别包装器的类/名称,我不知道 flashgalley 方法,所以我无法帮助您,只需查找它用作包装器的 div 的类/名称,查看 html,然后找到最大高度并将它们全部设置为:

var wrappers = $('div.wrapper');
var maxHeight = 0;
for(var i in wrappers){
    if (maxHeight < wrappers[i].height()){
        maxHeight = wrappers[i].height();
    }
}
$('div.wrapper').height(maxHeight);

这将复制您链接到的插件的功能

于 2013-03-13T11:44:14.733 回答
0

只需使用 CSS,

  div#wrapper > div{height:200px} 'assuming you want 200px height for all div within wrapper

我希望这会做,如果不回复:)

于 2013-03-13T11:29:27.960 回答
0

在 CSS 中:

#wrapper { height: 400px; } //or whatever you like

#wrapper.box_left, #gallery_container1 { height: 100% }
于 2013-03-13T11:31:49.203 回答