Bootstrap 3 - Aligning column height

 ̄綄美尐妖づ 提交于 2019-12-02 09:56:29

Here is a snippet, but I can't realize why are so huge gaps between columns.

Although look at https://jsfiddle.net/xeen9s7y/ - it works well.

I've added border: solid 1px red; to images for better visual control.

img {
    width: 100%;
    height: 100%;
    border: solid 1px red;
}
.imgcont {
    height: 25vw;
    padding: 1px;
}
.imgcont2 {
    height: 50vw;
    padding: 1px;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
      <section class="portfolio-content">
            <div class="row" id="port-first-row">
                <div class="col-xs-6" id="port-first-col">
                    <div class="row">
                        <div class="col-xs-12 imgcont">
                            <img src="//placehold.it/200x150/2255EE" alt="image"/>
                        </div> <!-- end col-12 -->
                        <div class="col-xs-12 imgcont">
                            <img src="//placehold.it/200x150/2255EE" alt="video" />
                        </div> <!-- end col-12 -->
                    </div> <!-- end row -->
                </div> <!-- end port-first-col -->

                <div class="col-xs-6 imgcont2" id="port-second-col">
                    <img src="//placehold.it/200x150/2255EE" alt="image" />
                </div> <!--end port-second-col -->
            </div> <!-- end port-first-row -->

            <div class="row" id="port2-second-row">
                <div class="col-xs-6 imgcont" id="port2-first-col">
                    <img src="//placehold.it/200x150/2255EE" alt="phuket" />
                </div> <!-- end col-sm-6 -->
                <div class="col-xs-6 imgcont" id="port2-second-col">
                    <img src="//placehold.it/200x150/2255EE" alt="julie" />
                </div> <!-- end col-sm-6 -->

            </div> <!-- end port-second-row -->
        </section> <!-- end portfolio-content -->
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!