I am facing an issue with loading an external CSS file into my index.php. I have placed the external CSS file at the end of all other CSS files like bootstrap and font awesome. However, when I try to make changes to the design using the code in the external CSS file, it doesn't seem to take effect because I suspect that it's not loading on my webpage.
Below is the code snippet from my index.php file:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="icon" href="img/favicon.ico">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/fontawesome-all.min.css">
<link rel="stylesheet" href="css/index.css">
</head>
<body>
<?php include 'header.php'; ?>
<div>
</div>
<?php include 'footer.php'; ?>
<script src="js/jquery-3.3.1.min.js"></script>
<script src="js/popper.min.js"></script>
<script src="js/bootstrap.bundle.min.js"></script>
<!--<script type="text/javascript" src="http://www.google-analytics.com/ga.js"></script>-->
</body>
</html>
Here's the code in my header.php file:
<header class="navbar">
<nav class="navbar navbar-expand-md bg-light navbar-light fixed-top">
<!--<a class="navbar-brand" href="index.php">O.S.P</a>-->
<a class="navbar-brand" href="index.php">
<img src="img/osp_logo_1.jpg" alt="logo" style="width:40px">
</a>
<span class="navbar-text">Online Service Provider</span>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="collapsibleNavbar">
<ul class="navbar-nav mx-auto">
<li class="nav-item active mr-sm-5"><a class="nav-link" href="index.php">Home</a></li>
<li class="nav-item dropdown mr-sm-5">
<a class="nav-link dropdown-toggle" href="services.php" id="navbardrop" data-toggle="dropdown">Services</a>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">Services Type 1</a>
<a class="dropdown-item" href="#">Services Type 2</a>
</div>
</li>
<li class="nav-item mr-sm-5"><a class="nav-link" href="about-us.php">About Us</a></li>
<li class="nav-item mr-sm-5"><a class="nav-link" href="sign-in.php">Sign In</a></li>
<li class="nav-item"><a class="nav-link" href="sign-up.php">Sign Up</a></li>
</ul>
</div>
<form class="form-inline" action="">
<input class="form-control mr-sm-2" type="text" placeholder="Search">
<button class="btn" type="submit">
<i class="fa fa-search"></i>
</button>
</form>
</nav>
</header>
And this is the code in my external CSS file index.css:
body{
background-color: darkgrey;
}
.form-inline .form-control{
width: 200px;
}
I am trying to change the width of the search box, but even after loading the external CSS file, the change is not reflected on the webpage.