简体   繁体   中英

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

You can try with below css

div, img {
  margin: 0;
}

div { 
  padding: 0; 
}

Updated

img {margin-top: -4px }

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM