Unable call stylesheet |
[eluser]chrisferrill[/eluser]
I call my style sheet normal with <link rel.......... /> My page seems to not be seeing this piece of code is there something I need to do with the controller or model??
[eluser]byde[/eluser]
Set this helper in your controller http://ellislab.com/codeigniter/user-gui...elper.html and use base_url(); for the complete URL then be sure the URL is ok If not working paste a bit of your code
[eluser]chrisferrill[/eluser]
I loaded the URL helper but still nothing happens. If I put css into the main view file, everything works. I would like to just get my global stylesheet working and called correctly thanks
[eluser]theprodigy[/eluser]
set your css files in the path you normally would. using an example path of '/assets/css/style.css', you would use one of the following Code: <link href="/assets/css/style.css" rel="stylesheet" type="text/css" /> Code: <link href="<?php echo base_url(); >assets/css/style.css" rel="stylesheet" type="text/css" />
[eluser]chrisferrill[/eluser]
Thank you so much!!! would this be the same if I am trying to reference a Jquery file??
[eluser]theprodigy[/eluser]
yes, it would be the same for all css, js, and images.
[eluser]pickupman[/eluser]
Although using absolute urls (http://www.site.tld), maybe easier to use, they are not as fast as using relative urls ('/assets/css/style.css'). The browser has to resolve your DNS for absolute links before downloading whereas a relative url does not. My guess is that you did not have a leading "/" to start the url to your css file. |
Welcome Guest, Not a member yet? Register Sign In |