So I have two input elements nested inside a div, a text input and a button.
However, when I increase the width and height of the button, it also increases the size of the adjacent text input. I'd like to learn why this is.
I am theorizing it's because both are located inside the nested div, and are being affected by the div's styling. Below is my HTML.
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="./style.css">
    <title>Nick's Todo List</title>
</head>
<body>
    <h1 class="main-header">Nick's Todo List</h1>
    <div class="input-container">
        <input id="input-box" type="text">
        <input id="add-btn" type="button">
    </div>
    <script src="./app.js"></script>
</body>
</html>
Below is my CSS
h1 {
    text-align: center;
}
.input-container {
    display: flex;
    justify-content: center;
}
#add-btn {
    width: 4.5em;
    height: 4.5em;
}
Thanks!
 
    