CodeIgniter Forums
cannot load image inside CSS folder - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: cannot load image inside CSS folder (/thread-53906.html)



cannot load image inside CSS folder - El Forum - 08-13-2012

[eluser]renkinjutsushi[/eluser]
Please Help me
i have a problem

i cannot load image inside the css folder
the path is
Code:
"Codeigniter/css/img"
on codeigniter folder contain, application, system, index.php, .htaccess , etc

i cannot load image file on img folder

are the img require permission to access ??? how to add it ???
or another problem
please help me to load image on that folder
Thanks Big Grin


cannot load image inside CSS folder - El Forum - 08-13-2012

[eluser]InsiteFX[/eluser]
It would help if you show the code were you are trying to load the image.



cannot load image inside CSS folder - El Forum - 08-13-2012

[eluser]renkinjutsushi[/eluser]
my code

Code:
on view.php

<link rel="stylesheet" type="text/css" media="all" href="<?php echo base_url()?>/css/jsDatePick_ltr.min.css" />

CSS was loaded but it can't load image

CSS file is placed on css/img
[img=http://www.mediafire.com/view/?27zkkvy02vb9cic][/img]

when i run it without server it works, image can be loaded
but when i placed it on the server the image can't be loaded


cannot load image inside CSS folder - El Forum - 08-14-2012

[eluser]InsiteFX[/eluser]
Code:
<link rel="stylesheet" type="text/css" media="all" href="<?php echo base_url('css/jsDatePick_ltr.min.css'); ?>" />




cannot load image inside CSS folder - El Forum - 08-14-2012

[eluser]renkinjutsushi[/eluser]
^
it still cannot load the image on img folder


cannot load image inside CSS folder - El Forum - 08-14-2012

[eluser]CroNiX[/eluser]
Then whatever you're using for your image src is probably wrong, or the images are not in a publicly accessible directory.

What does the raw HTML for the IMG tag look like after the page is rendered (view source)? You haven't showed how you are doing that. Is the image a raw IMG or is it a background image within your css?

You need to post more code showing exactly what you are doing. People can't really help by keep guessing.


cannot load image inside CSS folder - El Forum - 08-15-2012

[eluser]renkinjutsushi[/eluser]
ok, i'm sorry

the image is loaded by CSS

for the hierarchy folder you may see te image in link below
http://www.mediafire.com/view/?27zkkvy02vb9cic

on CSS folder include img folder
here is part of code where image called by css "jsDatePick_ltr.min.css"

Code:
background:url(img/closeButton_down.gif)

on my case,
CSS was loaded but the image can't be loaded



cannot load image inside CSS folder - El Forum - 08-15-2012

[eluser]TWP Marketing[/eluser]
Does the image have "read" privileges set?
Have you tried another image in the same directory?
Check your apache error.log file.


cannot load image inside CSS folder - El Forum - 08-15-2012

[eluser]CroNiX[/eluser]
Try not using a relative path for your image in the css.

If you can view that image by going to www.yoursite.com/img/closeButton_down.gif, then your url in the css (and anywhere else) should be "/img/closeButton_down.gif" starting with a slash so it's not relative to the current url, but relative to site root.


cannot load image inside CSS folder - El Forum - 08-15-2012

[eluser]Aken[/eluser]
Image URLs in the CSS file are relative to the CSS file only. Has nothing to do with the current URL.

Your CSS and directory structure looks fine. Things to check:

1) The image actually exists.
2) The img folder has read access.
3) Clear your cache and check again.
4) The background isn't hidden through background-position, an element on top of it, etc.