Since I'm not a CSS enthusiast, I opted to incorporate Bootstrap into my small project. However, I've encountered an issue where one of the containers is extending beyond the page view, and I can't seem to figure out why.
<!-- STYLE -->
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="caa8a5a5beb9beb8abba8affe4f9e4fae7aba6baa2abfb">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
<nav class="navbar bg-primary">
<div class="container text-white justify-content-center">
<h1>Weather Dashboard</h1>
</div>
</nav>
<main class="">
<div class="row">
<div class="col-sm-3 bg-secondary">
<!-- SIDE BAR ?-->
<div class="row">
<!-- side bar first row -->
<div class="container">
<h4>Search for a City:</h4>
<form>
<div class="form-group">
<input type="text" class="form-control" id="city-name-search" placeholder="Enter city name...">
</div>
<button type="submit" class="btn btn-primary w-100">Submit</button>
</form>
</div>
</div>
<div class="row">
<!-- side bar second row -->
<div class="container-fluid">
two
</div>
</div>
</div>
<div class="bg-danger col-9">
<!-- MAIN CONTENT -->
<div class="row">
<div class="container-fluid lh-1 border border-dark">
<h2>City name (dd/mm/yyy)</h2>
<p>Temp:</p>
<p>Wind:</p>
<p>Humidity:</p>
</div>
</div>
<div class="row">
<div class="container-fluid">
<h3>5-Day Forecast</h3>
</div>
</div>
</div>
</div>
</main>
<!-- SCRIPTS -->
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1c7e7373686f686e7d6c5c29322f322c317d706c747d2d">[email protected]</a>/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>
Here's a visual representation of the issue:
https://i.sstatic.net/2rcg3.png
Despite trying different margin and padding settings, I still haven't achieved the desired result. My searches on Google have also been fruitless in finding a solution.
On another note, does anyone know why 'btn-block' isn't working for me? I had to resort to using 'w-100' instead.