Hello there
I am using the following code for display the requested content.It is not the main page and here in this time only I need a css.But this CSS is not working.I dont know what is the reason.Please help me on this.
echo '
<html>
<head>
<title>My site</title>
<link href="css/main.css"/>
</head>
<body>
<div class="header">
<div class="headercontent">
<div style="float: right; padding: 5px 15px 0pt 0pt;">Site</div>
<br>
</div>
</div>
'
But the CSS is not working here.
Your
<link>needs the properties that make the browser know it’s CSS, like this:Unless your server is already transferring it with a
"text/css"MIME type, the browser’s a bit confused on what it should do with this file, unaware it’s a stylesheet.It’s important to remember
<link>elements have many other purposes so you need to tell it (specifically withrel) what this one does, since they can also be used for: