• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Codeigniter + CSS not working well, possible baseurl

#2
[eluser]apodner[/eluser]
Typically, I create an "assets" directory for files that need to be accessed.

-application
-system
-assets
--images
--scripts
--styles

the rule of thumb is usually that all file references are based upon the index.php file. In theory, this means you would access an image via "assets/images/imageName.jpg"

When I am building stylesheet and javascript links, I usually do the following:


<link rel="stylesheet" type="text/css" href="<?=base_url()?>assets/styles/style.css" />


Never had any problems with it when I do it this way.

You might also consider setting up for multiple environments. Have your base url set one way for development and another for production. http://ellislab.com/codeigniter/user-gui...ments.html





Messages In This Thread
Codeigniter + CSS not working well, possible baseurl - by El Forum - 12-09-2012, 07:48 AM
Codeigniter + CSS not working well, possible baseurl - by El Forum - 12-09-2012, 12:12 PM
Codeigniter + CSS not working well, possible baseurl - by El Forum - 12-09-2012, 03:14 PM
Codeigniter + CSS not working well, possible baseurl - by El Forum - 12-11-2012, 10:10 PM
Codeigniter + CSS not working well, possible baseurl - by El Forum - 12-12-2012, 12:57 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.