Welcome Guest, Not a member yet? Register   Sign In
Images, CSS, JS disappear on any controller, but home page
#4

[eluser]intractve[/eluser]
if you use this (in your view):

Code:
<link  href="<?=base_url()?>global_assets/templates/default/css/body.css" rel="stylesheet" type="text/css" />

your problem should be solved.

Relative URL's always load relative to whatever url you have in your browser's url box, so what happens when you load a different controller is that the browser looks for your css/image files at "http://localhost/mydirectory/information/shipping/global_assets/templates/default/css/body.css" which is not the right place it's stored in. by using the base_url() function you are outputting "http://localhost/mydirectory/" and then tacking on "global_assets/templates/default/css/body.css" which will work all over your site.

Have Fun


Messages In This Thread
Images, CSS, JS disappear on any controller, but home page - by El Forum - 08-31-2010, 07:32 PM



Theme © iAndrew 2016 - Forum software by © MyBB