Greg Gum
Greg Gum

Reputation: 38019

How to remove white space between two images

I have an .aspx page with two images that are the full width of the page.

The issue is that there is white space between the two images that I do not want.

<body>
<form id="form1" runat="server">
<div>
<img src="Images/NavBar.png"/>
<img src="Images/ImageHeader.png"  />
</div>
</form>

How do I remove the white space?

I am not using any CSS at the moment, but would if needed.

Edit This is the CSS that resolved:

img {margin-top: -4px }

Greg

Upvotes: 1

Views: 15065

Answers (2)

Suchita Garg
Suchita Garg

Reputation: 1

If you remove the space in between the 2 tag, it'll remove the gap. there is no need to add any margin or padding on img.

Upvotes: 0

Ashis Kumar
Ashis Kumar

Reputation: 6554

You can try with below css

div, img {
  margin: 0;
}

div { 
  padding: 0; 
}

Updated

img {margin-top: -4px }

Upvotes: 2

Related Questions