Issue
I have set up wordpress locally on my mac using Mamp and everything but the css file is not working. I can get the link for the CSS file right and when inspecting the code in Chrome and Safari it shows the right CSS file. But no matter what type of CSS codes I write it is not showing on my page.
Here is my header.php file
<html>
<head>
<meta charset="utf-8"/>
<link rel=”stylesheet” href="<?php bloginfo('stylesheet_url'); ?>" type=”text/css” media=”screen” />
<title>My first website</title>
</head>
<body>
And here is the CSS I'm trying to render:
* {
margin: 0;
padding: 0;
}
#wrapper {
font-family: 'Trebuchet MS', 'Lucida Sans Unicode', 'Lucida Grande', 'Lucida Sans', Arial, sans-serif;
}
So when it shows the code in the browser it looks like this
<html>
<head>
<meta charset="utf-8"/>
<link rel=”stylesheet” href="http://localhost/firstsite/wp-content/themes/newtheme/style.css" type=”text/css” media=”screen” />
<title>My first website</title>
</head> ```
I can even click the CSS file from the inspected code and will then see the right file. What am I doing wrong here? PS. I have tried hard refresh of Chrome.
Solution
The solution was the wrong usage of quotes as @gtamborero suggested. Thank you for that. Now the browser is reading the CSS perfectly.
Answered By - Nicolai Funch
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.