.css is not making relative links to images [message #474888] |
Wed, 03 December 2008 13:13  |
Eclipse User |
|
|
|
Forgive me if this has been posted before, I couldn't find it in my
search, and it seems like a fairly trivial issue.
I have an external .css that adds a background image to my notes, tips,
etc.
The .css includes a link to the image that is relative to the .css. When I
open the .html files in a browser, everything works as expected. However,
when I load the plugins in the Eclipse infocenter, the background images
do not show up.
After messing around in my plugin source, it looks like my Eclipse
infocenter makes a relative link from the HTML page, not from the .css.
What am I missing here?
|
|
|
|
|
|
Re: .css is not making relative links to images [message #474892 is a reply to message #474891] |
Wed, 03 December 2008 15:17   |
Eclipse User |
|
|
|
OK,
After some further investigation, I think this has to be an issue with the
Eclipse infocenter. (Eclipse v 3.4.1, 3.4.0)
Any .css-linked images render properly in Firefox and IE outside of the
infocenter, however when I view the Infocenter in Firefox, the images DO
NOT render.
Basically, when I view the infocenter in Firefox, Firefox wants to make a
relative link from the HTML page, not the .css. I know that this problem
used to exist with a past release of Netscape. I wonder if they need to
update something in the infocenter code?
The Eclipse help web browser works fine for both Firefox and IE - this
problem doesn't exist.
Has anybody else seen this? If not, I'll log a bug against it and get on
with my life.
|
|
|
Re: .css is not making relative links to images [message #474893 is a reply to message #474891] |
Wed, 03 December 2008 18:20  |
Eclipse User |
|
|
|
The resolution of the href in the css will simply cause a URL to be
passed to the server for the server to resolve. The exact url in the
request is apparently not exactly the same depending on whether you use
Firefox or IE and the help server is successful with one but not the
other. The eclipse help server recognizes PLUGINS_ROOT and treats it
differently to a regular path, which is why I think this is worth a try.
Morley Tooke wrote:
>
> I see where you're going, but plugins_root is an Eclipse variable, so
> the css probably won't recognize it?
>
> Also, the .css is the same for each plugin. I don't want to make it
> unique by including the plugin name.
>
> I'm reading more about the issue now. It seems that Firefox is a bit
> more picky with the .css than IE is.
> -loading the .html file in IE works
> -loading the .html file in Firefox works
> -loading the infocenter in IE works
> -loading the infocenter in Firefox doesn't work
> -changing the help browser in Eclipse to use IE works
> -changing the help browser in Eclipse to use the default, doesn't work.
>
>
>
|
|
|
|
Re: .css is not making relative links to images [message #622621 is a reply to message #474889] |
Wed, 03 December 2008 14:04  |
Eclipse User |
|
|
|
You may be able to get around this difference in browser behavior by
using a path which starts with PLUGINS_ROOT, such as
PLUGINS_ROOT/plugin_name/path/image.jpg. This should cause the server to
resolve the path correctly. If you try this let us know if it works.
Morley wrote:
>
> OK, after some further investigation, it looks like it's a browser
> issue. When I view my infocenter in IE, everything is kosher. Firefox
> uses a relative link from the HTML page, not the .css.
>
>
|
|
|
Re: .css is not making relative links to images [message #622622 is a reply to message #474890] |
Wed, 03 December 2008 14:21  |
Eclipse User |
|
|
|
I see where you're going, but plugins_root is an Eclipse variable, so the
css probably won't recognize it?
Also, the .css is the same for each plugin. I don't want to make it unique
by including the plugin name.
I'm reading more about the issue now. It seems that Firefox is a bit more
picky with the .css than IE is.
-loading the .html file in IE works
-loading the .html file in Firefox works
-loading the infocenter in IE works
-loading the infocenter in Firefox doesn't work
-changing the help browser in Eclipse to use IE works
-changing the help browser in Eclipse to use the default, doesn't work.
|
|
|
Re: .css is not making relative links to images [message #622623 is a reply to message #474891] |
Wed, 03 December 2008 15:17  |
Eclipse User |
|
|
|
OK,
After some further investigation, I think this has to be an issue with the
Eclipse infocenter. (Eclipse v 3.4.1, 3.4.0)
Any .css-linked images render properly in Firefox and IE outside of the
infocenter, however when I view the Infocenter in Firefox, the images DO
NOT render.
Basically, when I view the infocenter in Firefox, Firefox wants to make a
relative link from the HTML page, not the .css. I know that this problem
used to exist with a past release of Netscape. I wonder if they need to
update something in the infocenter code?
The Eclipse help web browser works fine for both Firefox and IE - this
problem doesn't exist.
Has anybody else seen this? If not, I'll log a bug against it and get on
with my life.
|
|
|
Re: .css is not making relative links to images [message #622624 is a reply to message #474891] |
Wed, 03 December 2008 18:20  |
Eclipse User |
|
|
|
The resolution of the href in the css will simply cause a URL to be
passed to the server for the server to resolve. The exact url in the
request is apparently not exactly the same depending on whether you use
Firefox or IE and the help server is successful with one but not the
other. The eclipse help server recognizes PLUGINS_ROOT and treats it
differently to a regular path, which is why I think this is worth a try.
Morley Tooke wrote:
>
> I see where you're going, but plugins_root is an Eclipse variable, so
> the css probably won't recognize it?
>
> Also, the .css is the same for each plugin. I don't want to make it
> unique by including the plugin name.
>
> I'm reading more about the issue now. It seems that Firefox is a bit
> more picky with the .css than IE is.
> -loading the .html file in IE works
> -loading the .html file in Firefox works
> -loading the infocenter in IE works
> -loading the infocenter in Firefox doesn't work
> -changing the help browser in Eclipse to use IE works
> -changing the help browser in Eclipse to use the default, doesn't work.
>
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.03656 seconds