Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Platform - User Assistance (UA) » .css is not making relative links to images
.css is not making relative links to images [message #474888] Wed, 03 December 2008 18:13 Go to next message
Morley Tooke is currently offline Morley Tooke
Messages: 19
Registered: July 2009
Junior Member
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 #474889 is a reply to message #474888] Wed, 03 December 2008 18:42 Go to previous messageGo to next message
Morley Tooke is currently offline Morley Tooke
Messages: 19
Registered: July 2009
Junior Member
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 #474890 is a reply to message #474889] Wed, 03 December 2008 19:04 Go to previous messageGo to next message
Chris Goldthorpe is currently offline Chris Goldthorpe
Messages: 815
Registered: July 2009
Senior Member
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 #474891 is a reply to message #474890] Wed, 03 December 2008 19:21 Go to previous messageGo to next message
Morley Tooke is currently offline Morley Tooke
Messages: 19
Registered: July 2009
Junior Member
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 #474892 is a reply to message #474891] Wed, 03 December 2008 20:17 Go to previous messageGo to next message
Morley Tooke is currently offline Morley Tooke
Messages: 19
Registered: July 2009
Junior Member
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 23:20 Go to previous message
Chris Goldthorpe is currently offline Chris Goldthorpe
Messages: 815
Registered: July 2009
Senior Member
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 #622620 is a reply to message #474888] Wed, 03 December 2008 18:42 Go to previous message
Morley Tooke is currently offline Morley Tooke
Messages: 19
Registered: July 2009
Junior Member
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 #622621 is a reply to message #474889] Wed, 03 December 2008 19:04 Go to previous message
Chris Goldthorpe is currently offline Chris Goldthorpe
Messages: 815
Registered: July 2009
Senior Member
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 19:21 Go to previous message
Morley Tooke is currently offline Morley Tooke
Messages: 19
Registered: July 2009
Junior Member
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 20:17 Go to previous message
Morley Tooke is currently offline Morley Tooke
Messages: 19
Registered: July 2009
Junior Member
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 23:20 Go to previous message
Chris Goldthorpe is currently offline Chris Goldthorpe
Messages: 815
Registered: July 2009
Senior Member
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.
>
>
>
Previous Topic:.css is not making relative links to images
Next Topic:Glitch in CSS usage
Goto Forum:
  


Current Time: Sat Oct 25 00:01:31 GMT 2014

Powered by FUDForum. Page generated in 0.12511 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software