views:

137

answers:

4

I'm working on a Wordpress blog. I'm embedding a stylesheet as follows:

<link rel=”stylesheet” href="<?php bloginfo("stylesheet_url"); ?>" type=”text/css” media=”screen” />

However, the CSS doesn't render, at all. I've checked that the URL that is being put in the href is correct. The CSS is found. But, it doesn't render, in all browsers. I am utterly stumped, and would really appreciate a nudge in the right direction. I'm using MAMP 1.8.3, and Wordpress 1.2.9.

A: 

View Source in your browser and copy the link URL. Then validate it here.

SpliFF
The CSS is valid, it works fine when embedded with <style type="text/css"></style>. It just won't work when embedded with a <link />. My suspicion is it's something to do with Apache, but I'm not sure.
Debashis
is the link in head or body?also the validator will tell you what the content of your link is so you should validate regardless
SpliFF
It's in the head, and the validator gives me the content of the link correctly.
Debashis
A: 

I think the main css file must be in the root of the template folder and you will have to link any other css files within the main css file

Example

@import url('css/reset.css');
@import url('css/typography.css');

Hope this was what you were looking for. Good luck.

Timothy Reed
A: 

looks like you have double quotes instead of single.

Should be

('stylesheet_url');

Hope this helps.

Timothy Reed
The PHP is interpreted before the HTML and replaced with a URL. This won't help.
David Dorward
A: 

The problem was with my keyboard. It created characters that looked like double quotes, but weren't. Upon making them actual double quotes, the CSS worked. Thanks for the help, everyone!

Debashis