-2

<!DOCTYPE html>
<html>
    <head>
        <title>index</title>
    </head>
    <body>

        <img  src="https://i.stack.imgur.com/aCcmV.jpg" alt="Map" style="width: 100%;height: auto;">
        <footer style="background-color: black; color: white; text-align: center;">
            This is My Footer
        </footer>

    </body>
</html>

enter image description here

How To get rid of this space between img and footer. I inspected this space. it is neither related to footer nor img

  • You likely have margin above the footer. You would need to post some HTML and CSS for us to see what the issue is – fraggley Jun 05 '20 at 02:23
  • 1
    You need to provide the code you are working with. It may be best to recreate the problem in jsFiddle or codepen and post the link here along with the code in case the link breaks. Often recreating the issue with one of these tools will help you find the fault on your own but if you still don't find it, post the code here for us. – MilkyTech Jun 05 '20 at 04:08
  • do i post my whole project? – Mudassir Ahmed Jun 05 '20 at 04:45
  • @MudassirAhmed - No, just enough code to reproduce the problem. See [How to create a Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) – MilkyTech Jun 05 '20 at 13:15

1 Answers1

-1

you will have to set the margin of the footer element and the bottom margin of the img to zero, I would prefer to see your source code to provide a more accurate response

Tobecci
  • 89
  • 1
  • 3