Вопрос по html, css – 2 деления в большем делении должны быть одинаковой высоты ... но как?

1

Error: User Rate Limit Exceeded

enter image description here

Error: User Rate Limit Exceeded

Error: User Rate Limit Exceeded Tobi
Error: User Rate Limit Exceededcss-tricks.com/fluid-width-equal-height-columns ---------------------- matthewjamestaylor.com/blog/… Rohit Azad
Error: User Rate Limit Exceeded Hristo
Error: User Rate Limit Exceeded mfadel
Error: User Rate Limit Exceeded Michał Miszczyszyn

Ваш Ответ

4   ответа
5

use background on the containing div which will imitate the border use CSS3 techniques (display:table and display:table-cell, but these are not really meant for this or CSS3 flexbox which is highly experimental and probably won't work in most browsers) use JS to set the column height to the maximum of heights of the elements

var max=0;
$('#container').children().each(function(){
    if($(this).height()>max) max = $(this).height();
});
$('#container').children().each(function(){
    $(this).height(max);
});

2

HTML

    <div class="child_1">First Div content goes here</div>
    <div class="child_2">Second Div content goes here</div>
</div>

CSS

.wrapper {
        width: 960px;
        overflow: hidden;
        margin: 0px auto;
    }

    .child_1, .child_2 {
        padding-bottom: 9999em;
        margin-bottom: -9999em;
        width: 50%;
        float: left;
    }

    .child_1 {
        background: #f00;
    }

    .child_2 {
        background: #0f0;
    }
0

float

0

Похожие вопросы