Whitespace Around Image

Unwanted white space around image inside div

Try this:

.productimg{
width: 100%;
height: auto;
}

If the width of its container is defined, you don't need to set a max-width on the image either with this code.

White space around image

.image {
padding-right: 10px
}

How do I remove white space from around a body background image?

Just remove the border classname on the first div child of body. This adds a 1px solid border by default.

It's working even without your margin and padding set to 0!important in body since you have a _reboot css that already resets the body to margin 0.

why there is a white space around image and it's border when the border is greater than 1px?

Have you tried anything with the background-size property?

https://www.w3schools.com/cssref/css3_pr_background-size.php

If you haven't, I'd start with that and see what you can come up with.

Remove the white space around the jpg image button in android studio

That's an ImageButton. It's a button with an image. The gray border is the button. If you don't want that and just want a clickable image, use ImageView instead of ImageButton



Related Topics



Leave a reply



Submit