html {
font-size : 10px;
}
body {
text-align : center;
color : #9da8c1;
font-family : sans-serif;
background : #013f81;
}
h1 {
font-size: 4rem;
}
#img-div {
background : #2a5590;
width : 600px;
margin : 0 auto;
padding : 10px;
}
#conway-photo {
height : auto;
width : 500px;
}
figcaption {
font-size : 1.5rem;
background : red;
}
<main id="main">
<h1 id="title">John Horton Conway<h1>
<figure id="img-div">
<img id="conway-photo" src="https://static01.nyt.com/images/2020/04/18/obituaries/14Conway1/14Conway1-mediumSquareAt3X-v2.jpg"</img>
<figcaption>J.H.Conway holding a model of polyhedron</figcaption>
<figure>
</main>
I am trying to adjust the padding in the figure tag of my HTML code to ensure that the text and image are equidistant from the border. However, I am encountering an issue where there is more space at the bottom than at the top, and there is a noticeable jump in spacing when switching between padding values. Any insights on resolving this problem would be greatly appreciated.