Upon submitting my exercise for The Odin Project, I was under the impression that everything looked perfectly aligned and centered on my MacBook Pro 15-inch screen. However, when I viewed the completed webpage on a larger computer screen at work, I noticed that the input search box was no longer centered. Additionally, the microphone image within the search box and the two grey buttons below it seemed to roam freely when the window was resized.
Instead of starting over from scratch, I attempted to group the form box, microphone image, and buttons into their own Divs in an effort to center the box, but unfortunately, this did not solve the issue. I also experimented with flexbox, margin: 0 auto, and adjusting the widths, but none of these tactics worked.
You can view the project here:
The code for the project can be found here: https://repl.it/@jl88s/RoyalblueFarTrust
<section class="main-container">
<h1 class="google-logo-header">Google</h1>
<img src="google-logo.svg" alt="google-logo" id="google-logo">
<form action="/action_page.php">
<input class="form-box" type="text" name="search">
<a href="#"><img src="google-mic.png" id="google-mic" alt="microphone"></a>
</form>
<button class="btn-one buttons">Google Search</button>
<button class="btn-two buttons">I'm Feeling Lucky</button>
</section>
My hope is that resizing the window will result in the search box, mic, and buttons being perfectly centered and responsive to the screen size.