0

Have added two images to same line, they auto fill the width - but how can I remove the padding between the images?

And remove the "line break" so I can have e.g. 4 images (2x2) without any padding in between??

The code is like this:

<div class="col-md-6">
<img src="{{media url="wysiwyg/1.jpg"}}" style="width:100%"/>
</div><div class="col-md-6">
<img src="{{media url="wysiwyg/2.jpg"}}" style="width:100%"/>
</div>
  • 1
    Confirm padding is given to div or image? – Dhiren Vasoya Aug 22 '18 at 9:57
0

I think you are using bootstrap. you need to add .no-gutters with col-md-6 then both images are in same line without padding.

Otherwise you can you your custom css for padding.

.custom-class > [class*=col-]{
   padding-right:0;
   padding-left:0;
}

Do not use inline style in div tag.

for line break add this style

img{
    display: block;
    width: 100%;
    vertical-align: top;
}
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.