I have this in my HTML file, you can see that the image tag and the button tag has the same width (40%) in the style attribute
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<div style="display: flex; flex-direction: column;">
<img src="Assets/Blimp VB.png" alt="Preview of my second attempt to make a game" width="40%" style="
border: 2px solid black;
border-bottom: none;
border-top-left-radius: 20px;
border-top-right-radius: 20px;">
<button type="button" style="
height: 100px;
width: 40%;
border: 2px solid black;
border-top: none;
border-bottom-left-radius: 20px;
border-bottom-right-radius: 20px;"
>2nd attempt to make a game</button>
</div>
</body>
</html>
And when I run the file, I the div looked like this:
Why is the image still wider than the tag? I'm assuming that the width doesn't take account of the border, but then how do I fix this?
Also, I'm not promoting Blimp, I'm using that as a placeholder for the preview of the project.