CSS is not working with the CodeIgniter Framework even after loading the "healper('url'); and helper('html');" and using link_tag. Even I have used base_url. The following code is in Views folder <?php $link = array( 'href' => 'application/views/CSS/main.css', 'rel' => 'stylesheet', 'type' => 'text/css', ); echo link_tag($link); ?> </head> PHP: Someone please help...
This is not a CSS problem, this is a broken methodology problem. First of all, check whether that (silly) bit of code actually prints what you demand and verify the target, i.e. if the HREF attribute is pointing at the right location. The question I'm tempted to ask here is -- WHY? What purpose does that PHP serve in this particular case? Given that you're already specifying the full path, there's probably zero reason to be doing what you're doing there. Also, you should really declare the MEDIA attribute on your LINK. On a side note, here's the description of that framework you're using. Please don't laugh at me for not knowing what Codeigniter was until now, but I really do not get to point of using a framework of a framework. It's a little redundant IMHO. That right there is DO-NOT-TOUCH sign for me.
... and people wonder why I call PHP frameworks bullshit. If you don't realize how unbelievably STUPID that code is, you probably shouldn't be creating HTML or PHP. Also wouldn't hurt to properly state a MEDIA target...
OK, finally I found the reason. The code-igniter framework 3.0 is not stable version, using 2.0 solved the problem.
I should also point out that coming back to the forum to explain the cause and the fix is showing proper netiquette. For that, thank you. You done good. cheers, gary
That was nice to see, just in case someone ends up here with the exact same problem. I hate it when people just say "fixed", don't bother telling us it's fixed, or worse, delete the contents of the original post once it is "fixed".