Answer the question
In order to leave comments, you need to log in
How to stretch image to full column bootstrap 4?
Good day!
There is a block with columns. An image is displayed in these columns. Images can be of different widths/heights.
Please tell me how you can stretch the image to the entire column, regardless of the width / height.
img-responsive doesn't help
<? foreach ($arResult["ITEMS"] as $arItem): ?>
<div class="col-lg-4">
<div class="wrap_images">
<? if ($arParams["DISPLAY_PICTURE"] != "N" && is_array($arItem["PREVIEW_PICTURE"])): ?>
<? if (!$arParams["HIDE_LINK_WHEN_NO_DETAIL"] || ($arItem["DETAIL_TEXT"] && $arResult["USER_HAVE_ACCESS"])): ?>
<a href="<?= $arItem["DETAIL_PAGE_URL"] ?>">
<img class="img-responsive" src="<?= $arItem["PREVIEW_PICTURE"]["SRC"] ?>" alt="<?= $arItem["PREVIEW_PICTURE"]["ALT"] ?>" title="<?= $arItem["PREVIEW_PICTURE"]["TITLE"] ?>"/>
</a>
<? else: ?>
<img class="img-responsive" src="<?= $arItem["PREVIEW_PICTURE"]["SRC"] ?>" alt="<?= $arItem["PREVIEW_PICTURE"]["ALT"] ?>" title="<?= $arItem["PREVIEW_PICTURE"]["TITLE"] ?>"/>
<? endif; ?>
<? endif ?>
</div>
</div>
<? endforeach; ?>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question