GD77 Posted March 26, 2013 Share Posted March 26, 2013 Hello: I ve .css file with background images where paths are not working :/ex: .cmd {background:url(/assests/theme/theme1/img01.png);} any work around since we can t use base_url() in css of course... Quote Link to comment https://forums.phpfreaks.com/topic/276185-codeigniter-and-css/ Share on other sites More sharing options...
codebyren Posted March 29, 2013 Share Posted March 29, 2013 You should look into and use "relative paths" (or URLs). Then you can provide the location of the background image relative to the location of the CSS file. Something like: url('../../images/image.jpg') The above (for example) would traverse two levels up from where the CSS file is located and then into an "images" subdirectory to find image.jpg Quote Link to comment https://forums.phpfreaks.com/topic/276185-codeigniter-and-css/#findComment-1421863 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.