While trying to implement Bootstrap grid, I ran into an issue. When executing the code below:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Card Gallery</title>
<link href="
https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="05676a6a71767177647545302b362b35">[email protected]</a>/dist/css/bootstrap.min.css"
rel="stylesheet" />
</head>
<body>
<div class="row " style="height: 200px; background: gray; padding: 20px">
<div class="col-4" style="background-color: brown;"></div>
<div class="col-8" style="background-color: blue;"></div>
</div>
<script src="
https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="47252828333433352637077269746977">[email protected]</a>/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
a horizontal scrolling bar appearshttps://i.sstatic.net/ED5Sl9PZ.png
To address this issue, I applied the 'w-100' class on the 'row' element
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Card Gallery</title>
<link href="
https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="cfada0a0bbbcbbbdaebf8ffae1fce1ff">[email protected]</a>/dist/css/bootstrap.min.css"
rel="stylesheet" />
</head>
<body>
<div class="row w-100" style="height: 200px; background: gray; padding: 20px">
<div class="col-4" style="background-color: brown;"></div>
<div class="col-8" style="background-color: blue;"></div>
</div>
<script src="
https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="76141919020502041706364358455846">[email protected]</a>/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
However, now there is extra space on the right. https://i.sstatic.net/QSwaU7pn.png
How can I remove the scroll in the first scenario or eliminate the excess space on the right in the second case?