Welcome Guest, Not a member yet? Register   Sign In
CSS - Image Links Problem
#1

[eluser]jaswinder_rana[/eluser]
I have structure like this

system
public_html
-public/images
-public/css


So, my system is below my index.php. My actual files, on my local server, are http://localhost/my/mypage/index.php

So, system is at http://localhost/my/system (was testing how will it work if I put it before public_html; so here mypage is ACTING like public_html). Anyways.

I am including my CSS like echo link_tag('/public/css/admincp.css');

In my CSS, I have a background image like background:#fff url(/public/images/footer_bg.gif) top left repeat-x;

Now, my CSS link works but image doesn't. I understand that link_tag() function appends base_url in front of the CSS link.

Is there a way that I can do the same for my background images? I don't want to have to change path if I change a directory.

What if I rename my public_html (in this case mypage) directory?


So, in short, mypage is ACTING like public_html but is NOT public_html, /public/images/... links won't work because mypage is at http://localhost/my/mypage (it's /my/mypage/public/image/...)


Not sure if I explained it properly.

Thanks


Messages In This Thread
CSS - Image Links Problem - by El Forum - 12-14-2008, 11:30 PM
CSS - Image Links Problem - by El Forum - 12-15-2008, 12:19 AM
CSS - Image Links Problem - by El Forum - 12-15-2008, 06:55 AM



Theme © iAndrew 2016 - Forum software by © MyBB