Skip to content Skip to sidebar Skip to footer

Added A Space Between An Image And A Div Using Bootstrap

Solution 1:

<div class="row">
    <divclass="col-md-2"><divclass="yourAdditionalMarginClass"><imgid="image"src="img.png"class="img-responsive"></div></div><divclass="col-md-4"><divid="otherPart"> ... </div></div></div>

The image is responsive now, the basic padding of the col's is applied and if you need even more padding/margin, wrap another div around the image, give it a class and apply your styles to that class.

Solution 2:

Remove the col-md-2 from the image and add it to the outer most div like:

<divclass="row col-md-2">
    ...
</div>

Solution 3:

Try this way

<div class="row">
    <divclass=" col-md-2"><imgid="image"src="img.png"></div><divid="otherPart"class="col-md-4"></div></div>

Post a Comment for "Added A Space Between An Image And A Div Using Bootstrap"