As you can see from my code I am still learning so any constructive criticism unrelated to this problem regarding my code and its structure is not only welcomed as it is greatly appreciated.
I've added coloured borders to better understand the limits of each element.
At current the problem is that the image (blue border) ought to stay inside its parent meaning the header (pink border) since I've given the image a max width of 100%. But instead 100% seems to be a specific location outside all the elements.
HTML:
<main id="main">
<div id="main-wrapper">
<header>
<title>Tristerix Aphyllus</title>
<h1 id="title">Tristerix Aphyllus</h1>
<div id="img-div">
<img
id="image"
src="https://f000.backblazeb2.com/b2api/v1/b2_download_file_by_id?fileId=4_z15c789d4ee26751161fe0711_f11571cf7ab6ffd8a_d20200104_m185127_c000_v0001064_t0054"
alt="A close up of several Tristerix Aphyllus on multiple cacti"
/>
</div>
<p id="image-atribution">
<a
href="https://www.inaturalist.org/photos/13632769"
target="_blank">
© John D Reynolds
</a>
</p>
</header>
CSS:
#main-wrapper {
margin: 0% 30% 0% 30%;
border: hsl(355, 80%, 45%) 30px solid;
}
Header {
text-align: center;
font-color: hsl(355, 80%, 45%);
border: pink 30px solid;
}
#img-div {
margin: 0% 0% 0% 0%;
}
#image {
margin: 0% 0% 0% 0%;
border: blue 40px solid;
max-width: 100%;
}
#image-atribution {
text-align: right;
margin-top: 0;
font-size: 0.6em;
padding: 0px 10px 0px 0px;
}
(Sorry to the ones that initially opened the question with the code missing)