Calling External CSS Sheet in View.php for Custom Block

Permalink
Good afternoon,

I have a custom block type (view.php) and a custom style sheet (view.css). I can't seem to call the style sheet in view.php using normal methods.
<link rel="stylesheet" type="text/css" href="view.css">


The above code doesn't work for me. I did get it to work when I put all the css in style tags in the view.php file.

I'm sure I'm missing something here...any ideas?

Thank you for your help.

DeviantDeer
 
WillemAnchor replied on at Permalink Reply
WillemAnchor
Gondwana replied on at Permalink Reply
Gondwana
I find that view.css is loaded automatically, if it's in the same directory as view.php. Are you sure you need to explicitly link to it?
DeviantDeer replied on at Permalink Reply
DeviantDeer
That's what I thought too, but it is in the same directory and isn't applying the css. I haven't tried registering it yet like the link above suggests.
Gondwana replied on at Permalink Reply
Gondwana
Inspect the output source to see whether the .css file is being linked. If it is, perhaps there's a problem with its content, or perhaps the sequence in which files are being loaded is a problem.