I am trying to place use header.php above my bootstrap code as shown below. However, my code doesn't seem to work. It's as if the content in header.php is not added to the top of the code at all. I am using a phpmysql server running on local host to run the php files.
-Do I have to replace all the " to '?
calling it using:
<?php
include 'header.php';
?>
this content:
<?php
session_start();
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Bootstrap 101 Template</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">Project name</a>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Home</a></li>
<li><a href="#about">About</a></li>
<li><a href="#contact">Contact</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Log in <span class="caret"></span></a>
<ul class="dropdown-menu">
<input type="uid" placeholder="Enter Username" name="uid" required>
<input type="pwd" placeholder="Enter Password" name="psw" required>
<button type="submit">Login</button>
</ul>
<li><a href="#contact">My account</a></li>
</li>
</ul>
</div><!--/.nav-collapse -->
</div>
</nav>
It looks like you did not import bootstrap correctly. the classes in your header file did not get bootstrap.css. recheck directory of bootstrap. in your browser open "Developer tools" and then network tab press f5 and look satus of bootstrap.css
Set index to a php file instead of .html and worked