Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
Accessing images from css
  • Hi, When I try to display images with my CSS I can never reach them. I've got the default FuelPHP setup with a css folder and an img folder in assets.
    When I try to do
    background: url(../img/logo.png);
    
    the logo never displays although it will in the mockup pages I've made outside the Fuel project. In the chrome developer tools the URL is showing up as [url=http://localhost/genamor/assets//css/img/logo.png]http://localhost/genamor/assets//css/img/logo.png[/url]
    In the address there is a double slash before css which making the background url useless. I've got around it by doing ../../ in my stylesheets but is there anyway of just doing ../ ? The link for the CSS file is made using the Asset::css method by the way.
  • There is a bug in 1.2.1. that will produce the double slash on Windows. It has been fixed in 1.3/develop.
  • Okay, thanks Harro. Is the corrcted version already on Github?
    If so which files do I need to take?
  • Yes, in the 1.3/develop repo. Probably only Asset_Instance.
  • It works fine now. Thanks for the help.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion