Consider this scenario: within my CSS file, there is a line of code used to display an image - specifically, a label icon located in the sidebar.
background-image:url(../assets/images/icons/arrow_state_grey_expanded.png);
However, due to its relative path, at times the image fails to load when accessing certain pages.
Here are two examples, one where the image loads successfully and another where it does not:
http://localhost/portal_dev/subkeyword_view/add_subkeyword
http://localhost/portal_dev/subkeyword_view/view_subkeyword/20/20
How can this issue be resolved without relocating the image to the root project folder? It's worth noting that I am utilizing CodeIgniter 2.0 for this project. In PHP, I typically reference the full path of an image file to avoid similar problems.
UPDATE
Given that CSS file URLs are dependent on the location of the CSS file itself, and considering that my CSS loads correctly while the problem arises only with URLs containing parameters (as seen in example 2), it seems likely that this issue pertains more to CodeIgniter than the CSS file.