X
X
XenK2016-12-05 14:50:57
css
XenK, 2016-12-05 14:50:57

Fixed col-xs?

There are two rectangular blocks on which images are placed:

<div class="col-xs-2">
    <section class="container1">
        <div class="cm">
            <figure class="front">
                <img src="/img/bg.png" class="img-img" alt="">
            </figure>
            <figure class="back">
                <img class="img-img2" src="/img/dog.png" alt="">
            </figure>
        </div>
    </section>
</div>

When the window is scaled (reduced), the following happens:
671351fec0534437b27e84ba369f97e3.jpg
What is the best way to fix this?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Nikita, 2016-12-05
@Rema1ns

<img src="/img/bg.png" class="img-responsive" alt="">

M
Maxim Timofeev, 2016-12-05
@webinar

img {max-width: 100%; height:auto;}

Y
Yuri Oliyarnyk, 2016-12-05
@FoxPro111

set the height of the image and the height of the block in relative units vw
100vw - equal to the size of the screen
When the size decreases, the height of the block will also decrease

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question