HighDots Forums  

Re: Problem with <link> element

alt.html.tags alt.html.tags


Discuss Re: Problem with <link> element in the alt.html.tags forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Problem with <link> element - 05-11-2004 , 01:38 AM






"Axel Dahmen" <NO_SPAM (AT) NoOneKnows (DOT) de> wrote:

Quote:
I'm trying to use an external stylesheet on one of my HTML pages. But
none of my browsers follow the provided absolute URI.
You are not using an absolute URI.

Quote:
link
href="//62.75.136.138/Sportboot/ASPX/StyleSheets/BasicStyles.css"></li
nk
Why </link>? Good old HTML rules do not allow an end tag for a link
element, and you would not want to use XHTML if you knew what it means
(and if you knew, you would probably want to use Appendix C kludgery).

How do you expect browsers to know that the link element refers to a
style sheet and not, say, to an alternate version of the document? You
should add the attribute rel="stylesheet" and, as as matter of principle,
the attribute type="text/css".

Moreover, the URI you have in the href is not absolute but relative to
the server root. You need to include the protocol part http: to make it
absolute.

But why are you using an absolute URI for a style sheet reference, and
with an IP number (instead of a domain name) for the server?

As usual, posting the URI of the page would have been essential.
But you seem to be interested in hiding any useful addresses, or even
using forged addresses as in your From field.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html




Reply With Quote
  #2  
Old   
Axel Dahmen
 
Posts: n/a

Default Re: Problem with <link> element - 05-14-2004 , 04:49 PM






Hi, Jukka,

thanks four your reply. You were perfectly right, I've been missing the
protocol. The referring page was using https: ...

But let me reply to your notes though...

Quote:
Why </link>?
It's not me who's using the end tag, it's MS .NET. I'm using a server-side
script to generate the URI part. .NET automatically (and obviously wrong)
adds the end tag. I can't hinder it.


Quote:
How do you expect browsers to know that the link element refers to a
style sheet and not, say, to an alternate version of the document? You
should add the attribute rel="stylesheet" and, as as matter of principle,
the attribute type="text/css".
I'm actually using these attributes. I've just snipped them in my example
for legibility.


Quote:
Moreover, the URI you have in the href is not absolute but relative to
the server root. You need to include the protocol part http: to make it
absolute.
This is the solution to my problem. Thanks!


Quote:
But why are you using an absolute URI for a style sheet reference, and
with an IP number (instead of a domain name) for the server?
I'm just using different DNS entries for one single web application and I
don't want to imply a name. The page referring to my stylesheet comes from a
server residing at a different domain.


Quote:
As usual, posting the URI of the page would have been essential.
I can't. The page is generated from a payment system which renders the
payment result using my stylesheet to provide my customer with a familiar
layout.

Axel




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.