Thread: url-prefix via CSS?
Results 1 to 4 of 4
03-11-2003, 10:24 PM #1
url-prefix via CSS?
Ok, my problem is a bit hard to tell but I hope you can help me:
I parse a page via the PHP include-command into my webpage.
But I have no influence to the included page. Th eonly thing I can change is teh CSS-File.
The result is, as you can see that all elements from that page have relative-paths and so the link in the table do not work.
And now my question:
Is it possible to include a url-prefix VIA CSS so that the links work?
Does anyone have an idea?
I hope I receive a reply as soon as possible.
03-12-2003, 03:29 AM #2
CSS is for styling, not for content. You best bet would be to use PHP to implement a url system. Maybe setting a $root_dir variable in the inluded file and prefixing your links that way.
03-12-2003, 05:36 AM #3
The problem is: THe only thing I can change is the CSS file.
03-12-2003, 01:36 PM #4
Then your pretty stuck.
Your best bet would be to speak to the person who has control of the 'included' page.
Alternatively - look up the function ereg_replace, with that you can use file() to get the page data in an array, then use ereg_replace to change all the wrong urls to the correct ones, then output the result on your page.
That will do it. if you get stuck, post back. Be glad to help.