Utilizing SCSS to create my CSS has been the approach I've taken. The content of my main.scss
file remains consistent even after it is compiled into css
.
.my-custom-row {
background-color: bisque;
}
Contained within my index.html
file is everything needed for the project.
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="./stylesheets/main.css" rel="stylesheet">
<!-- Bootstrap CSS -->
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="caa8a5a5beb9beb8abba8affe4f8e4fa">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">
<!--
Everything is in a grid. A grid is a collection of rows and columns.
Each column can support 12 units. A unit is one element (as far as I can tell).
It can be set so that depending on screen size, the way things are layed out
are different as well.
-->
<title>Jia Hong's website</title>
</head>
<body>
<div class="container">
<div class="row my-custom-row">
<div class="col-sm-4"><div class="p-3 border bg-light">Col One</div></div>
<div class="col-sm-4"><div class="p-3 border bg-light">Col Two</div></div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/@popperjs/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="ef8c809d8aafddc1dedec1da">[email protected]</a>/dist/umd/popper.min.js"
integrity="sha384-Xe+8cL9oJa6tN/veChSP7q+mnSPaj5Bcu9mPX5F5xIGE0DVittaqT5lorf0EI7Vk"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="8fede0e0fbfcfbfdeeffcfbaa1bda1bf">[email protected]</a>/dist/js/bootstrap.min.js"
integrity="sha384-ODmDIVzN+pFdexxHEHFBQH3/9/vQ9uori45z4JjnFsRydbmQbmL5t1tQ0culUzyK"
crossorigin="anonymous"></script>
</body>
</html>
This illustrates how my project is structured.
.
├── html
│ └── index.html
├── scss
│ └── main.scss
└── stylesheets
├── main.css
└── main.css.map
I have explored various resources and guides on incorporating CSS into my website or project, yet despite this effort, I have encountered an issue. Specifically, the background within the .my-custom-row
selector fails to change, leaving me puzzled as to why.