473,320 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

link underline and no underline how to?

the site we're working on has some anchor links, you click them they
scroll to the bottom of the page with the answers to the questions
linked on to. is there anyway to make it so that the links are not
underlined when the page loads, when the user moves the mouse over
it's underlined, mouse out no underline. i tried:

<a href="#section14" class="drkblue08bold"
style="text-decoration:none">

but that left the underline gone forever, the class there is just for
color, color does not change no need to,

also tried:

<a href="#section14" class="drkblue08bold"
style="text-decoration:none"
onmouseover="this.style.textDecoration ='none';"
onmouseout="this.style.textDecoration='none';">

but this made it so there was no underline all the time, even if mouse
was over the text.

also tried

<a href="#section14" class="drkblue08bold"
onmouseover="this.style.textDecoration ='none';"
onmouseout="this.style.textDecoration='none';">

but with this the line is there when the page loads.

as you can see i'm also not using style sheets to do this, because the
main person who does the styles on the site is out for a while, so we
want to try to avoid messing with this work, is it possible to do this
without style sheets like above, or is style sheets are needed can
someone show how to do it.
Jul 23 '05 #1
29 49001
jmaxsherkimer said the following on 10/09/2004 23:53:
is there anyway to make it so that the links are not
underlined when the page loads, when the user moves the mouse over
it's underlined, mouse out no underline.
Yes, but I doubt if it's a good thing to do, since most users expect
links to be underlined (appart for menu's or maybe some other special use).
i tried:

<a href="#section14" class="drkblue08bold"
style="text-decoration:none">

but that left the underline gone forever, the class there is just for
color, color does not change no need to,
Works as expected then.
also tried:

<a href="#section14" class="drkblue08bold"
style="text-decoration:none"
onmouseover="this.style.textDecoration ='none';"
onmouseout="this.style.textDecoration='none';">

but this made it so there was no underline all the time, even if mouse
was over the text.
Still expected, since you declared it 3 times as none.
also tried

<a href="#section14" class="drkblue08bold"
onmouseover="this.style.textDecoration ='none';"
onmouseout="this.style.textDecoration='none';">

but with this the line is there when the page loads.
Also expected.
as you can see i'm also not using style sheets to do this, because the
main person who does the styles on the site is out for a while, so we
want to try to avoid messing with this work, is it possible to do this
without style sheets like above, or is style sheets are needed can
someone show how to do it.


Try this in the head:

<style>
<!--
a { text-decoration: none }
a:hover { text-decoration: underline }
//-->
</style>

--
Regards
Harrie
Jul 23 '05 #2
On Sat, 11 Sep 2004 02:31:03 +0200, Harrie
<di******************@hotmail.com> wrote:
Try this in the head:

<style>
<!--
a { text-decoration: none }
a:hover { text-decoration: underline }
//-->
</style>

Except leave out the comments - they're useless today. Unless you're
supporting really, really ancient browsers.
Jul 23 '05 #3
Harrie <di******************@hotmail.com> wrote:
a:hover { text-decoration: underline }


This may make _all_ <a> elements (including <a name="...">...</a>
elements) underlined on mouseover, depending on the interpretation of the
:hover pseudoclass in the browser. Using
:link:hover, :visited:hover { text-decoration: underline }
would be safer.

On the other hand, the OP should really first consider whether removing
underline is a good idea in the first place, and decide it is not, and
post CSS questions to c.i.w.a.stylesheets in future.

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

Jul 23 '05 #4
Neal said the following on 11/09/2004 07:11:
On Sat, 11 Sep 2004 02:31:03 +0200, Harrie
<di******************@hotmail.com> wrote:
<style>
<!--
a { text-decoration: none }
a:hover { text-decoration: underline }
//-->
</style>


Except leave out the comments - they're useless today. Unless you're
supporting really, really ancient browsers.


Ah, ok, I wasn't aware of that, thanks for mentioning. The same is true
for <script> I guess (not that I really need it, since I normally use
seperate files)?

--
Regards
Harrie
Jul 23 '05 #5
Jukka K. Korpela said the following on 11/09/2004 09:07:
Harrie <di******************@hotmail.com> wrote:
a:hover { text-decoration: underline }
This may make _all_ <a> elements (including <a name="...">...</a>
elements) underlined on mouseover, depending on the interpretation of the
:hover pseudoclass in the browser. Using
:link:hover, :visited:hover { text-decoration: underline }
would be safer.


Thanks, I forgot about that, just updated my own stylesheet (I used
a:link, a:visited and a:hover so I got it half right). The same is true
for the first rule I posted, so all should be like this I think?:

<style>
:link, :visited { text-decoration: none }
:link:hover, :visited:hover { text-decoration: underline }
</style>
On the other hand, the OP should really first consider whether removing
underline is a good idea in the first place, and decide it is not, and
post CSS questions to c.i.w.a.stylesheets in future.


Yes, my first answer to the OP was about if it was a good idea at all.

c.i.w.a.stylesheets or one of the JavaScript groups, depending on the
way the OP wants to go. There was a reference why the OP didn't want to
use stylesheets (allthough I interpreted this as "external stylesheets").

--
Regards
Harrie
Jul 23 '05 #6
Harrie said the following on 11/09/2004 13:03:
Neal said the following on 11/09/2004 07:11:
Except leave out the comments - they're useless today. Unless you're
supporting really, really ancient browsers.


Ah, ok, I wasn't aware of that, thanks for mentioning. The same is true
for <script> I guess (not that I really need it, since I normally use
seperate files)?


And another question, is this header still needed when one uses inline
stylesheets?:

<meta http-equiv="Content-Style-Type" content="text/css">

--
Regards
Harrie
Jul 23 '05 #7
On Sat, 11 Sep 2004 13:03:45 +0200, Harrie
<di******************@hotmail.com> wrote:
Neal said the following on 11/09/2004 07:11:


[snip]
Except leave out the comments - they're useless today. Unless you're
supporting really, really ancient browsers.


Ah, ok, I wasn't aware of that, thanks for mentioning. The same is true
for <script> I guess (not that I really need it, since I normally use
seperate files)?


The comment delimiters shouldn't have been needed during any point in the
last five or so years. Even browsers that aren't scriptable should have
included an understanding of the SCRIPT element when it was formally
introduced in HTML 3.2 in 1997[1].

Also, the type attribute has been required, and the language attribute
deprecated, for a similar length of time, which most people don't seem to
realise[2].

Mike
[1] Granted, SCRIPT, along with STYLE, was just a placeholder, but the
whole point was to prepare browsers to either parse it or ignore it, and
not render it. It should also be noted that the preparation *should* have
occurred at those times, but may not have.
[2] I blame out-of-date online tutorials and old scripting textbooks.
That, and a lack of actually RTFM.

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #8
On Sat, 11 Sep 2004 14:01:46 +0200, Harrie
<di******************@hotmail.com> wrote:

[snip]
And another question, is this header still needed when one uses inline
stylesheets?:

<meta http-equiv="Content-Style-Type" content="text/css">


Technically, I suppose it should. Just as

<meta http-equiv="Content-Script-Type" content="text/javascript">

should included when you use intrinsic events. However, I don't think any
browsers actually honour either. But, as it doesn't hurt to include
them[1], I use both (either set on the server or in HEAD).

Mike
[1] Unless someone can cite a browser still in use that chokes on such
headers.

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #9
Michael Winter said the following on 11/09/2004 15:39:
On Sat, 11 Sep 2004 13:03:45 +0200, Harrie
<di******************@hotmail.com> wrote:
Neal said the following on 11/09/2004 07:11:
[snip]
Except leave out the comments - they're useless today. Unless you're
supporting really, really ancient browsers.


Ah, ok, I wasn't aware of that, thanks for mentioning. The same is
true for <script> I guess (not that I really need it, since I
normally use seperate files)?


The comment delimiters shouldn't have been needed during any point in
the last five or so years.


I read and read and read (books, online tutorials, newsgroups) and still
I'm not up-to-date.
Also, the type attribute has been required, and the language attribute
deprecated, for a similar length of time, which most people don't seem
to realise[2].
[2] I blame out-of-date online tutorials and old scripting textbooks.
That, and a lack of actually RTFM.


<shame mode>Whoops! I always use the style attribute and the few times I
forget it the validator helps me remind it. I totally forgot it when I
posted the answer to the OP. Thanks for correcting me</shame mode>

Also thanks for the answer about the <meta http-equiv ...> question.

--
Regards
Harrie
Jul 23 '05 #10
Neal wrote:
On Sat, 11 Sep 2004 02:31:03 +0200, Harrie
<di******************@hotmail.com> wrote:
Try this in the head:

<style>
<!--
a { text-decoration: none }
a:hover { text-decoration: underline }
//-->
</style>

Where you have //-->, it should be /*-->*/ since // is a JavaScript
comment, not a CSS comment. However, it's not completely necessary for
CSS, since CDO '<!--' and CDC '-->' are allowed within CSS, and thus
don't need to be commented out. I think, IIRC, they stand for Comment
Delimiter Open and Close, respectively.
Except leave out the comments - they're useless today. Unless you're
supporting really, really ancient browsers.


Yes, in most cases, they are essentially useless but not always. If the
the style sheet needs to contain either '&' or '<' for whatever reason,
then the comment delimiters are needed, otherwise it will be invalid markup.

eg.
<style type="text/css"><!--
x:before { content: '<'; }
x:after { content: '>'; }
--></style>
(where x is any selector that is valid in that context)

However, if the document is XHTML, then when it is correctly parsed as
XML, instead of tag soup, then all the styles will actually be ignored
since they are part of the comment. Thus, for XHTML, the following
needs to be used:

<style type="text/css"><![CDATA[
x:before { content: '<'; }
x:after { content: '>'; }
]]></style>

But, that will not work for existing tag soup parsers when an XHTML
document is served as text/html. If you are writing XHTML 1.0, and you
are using content negotiation to serve it as application/xhtml+xml or
text/html as required, then in order to handle both situations, you need
to use this slightly more complicated version:

<style type="text/css"><!--/*--><![CDATA[/*><!--*/
x:before { content: '<'; }
x:after { content: '>'; }
/*]]>*/--></style>

That will work for for both HTML and XHTML parsers. Similarly, for
scripts, there is another syntax that needs to be used in the same
situation.

<script type="text/javascript"><!--//--><![CDATA[//><!--
...
//--><!]]></script>

For a better explantation, if that was not good enough, see Hixie’s
XHTML advocacy document:
http://www.hixie.ch/advocacy/xhtml

--
Lachlan Hunt
http://www.lachy.id.au/

Please sp***********@gmail.com
Thank you.
Jul 23 '05 #11
Lachlan Hunt <sp***********@gmail.com> writes:
<di******************@hotmail.com> wrote:
//-->
</style>

Where you have //-->, it should be /*-->*/ since // is a JavaScript
comment, not a CSS comment.


Oh; I thought it was a C++ comment.
Well, actually I thought it was no jolly good comment at all since we're
in an HTML authoring group here.
However, it's not completely necessary
for CSS, since CDO '<!--' and CDC '-->' are allowed within CSS,
Within the STYLE element type, you possibly wanted to say.
and
thus don't need to be commented out. I think, IIRC, they stand for
Comment Delimiter Open and Close, respectively.


s/Delimiter/Declaration

If the content model sees fit.

And yes, it's about the usual voodoo, pardon, bugwards compatibility.
--

Più Cabernet,
meno Internet.
Jul 23 '05 #12
Lachlan Hunt said the following on 12/09/2004 02:49:
Where you have //-->, it should be /*-->*/ since // is a JavaScript
comment, not a CSS comment. However, it's not completely necessary for
CSS, since CDO '<!--' and CDC '-->' are allowed within CSS, and thus
don't need to be commented out. I think, IIRC, they stand for Comment
Delimiter Open and Close, respectively.


Hmmm, I think you're right, but the w3c validator doesn't complain about
it when it's in the <head>. It does if you put it in an external
stylesheet. Is this a bug in the validator or is it simply ignoring
anything between <!-- and -->?

--
Regards
Harrie
Jul 23 '05 #13
Harrie wrote:
Lachlan Hunt said the following on 12/09/2004 02:49:
Where you have //-->, it should be /*-->*/ since // is a JavaScript
comment, not a CSS comment. However, it's not completely necessary
for CSS, since CDO '<!--' and CDC '-->' are allowed within CSS, and
thus don't need to be commented out. I think, IIRC, they stand for
Comment Delimiter Open and Close, respectively.

Hmmm, I think you're right, but the w3c validator doesn't complain about
it when it's in the <head>. It does if you put it in an external
stylesheet. Is this a bug in the validator or is it simply ignoring
anything between <!-- and -->?


Which validator are you referring to? The Markup validator or the CSS
validator? I'll assume both, since I just checked it and neither
complained. It is still valid markup, so the W3C Markup validator will
not find any errors with it, but it is not checking the validity of the
CSS. I believe the CSS validator should find errors with a '//', though
I do not have time to go through the CSS spec to double check. If it's
not allowed within external stylesheets, I would assume the same is true
for internal stylesheets within a <style> element. But, that's more of
a CSS question, which isn't really relevant in ciwah.

--
Lachlan Hunt
http://www.lachy.id.au/

Please sp***********@gmail.com
Thank you.
Jul 23 '05 #14
Eric B. Bednarz wrote:
Where you have //-->, it should be /*-->*/ since // is a JavaScript
comment, not a CSS comment.
Oh; I thought it was a C++ comment.


Yes, it is also, but that's where Java and JavaScript inherited the
comment syntax from.
Well, actually I thought it was no jolly good comment at all since we're
in an HTML authoring group here.


It is relevant as far as using them in HTML to hide comment tags from
script parsers.
However, it's not completely necessary
for CSS, since CDO '<!--' and CDC '-->' are allowed within CSS,


Within the STYLE element type, you possibly wanted to say.


Well, actually, they are valid within any CSS; just not in *all* places
within that CSS. They can be used wherever the CSS tokenization rules
say they're allowed. They just have no purpose within an external
stylesheet, as they are ignored by a CSS parser.

--
Lachlan Hunt
http://www.lachy.id.au/

Please sp***********@gmail.com
Thank you.
Jul 23 '05 #15
Tim
On Sat, 11 Sep 2004 13:31:26 +0200,
Harrie <di******************@hotmail.com> posted:
just updated my own stylesheet (I used
a:link, a:visited and a:hover so I got it half right). The same is true
for the first rule I posted, so all should be like this I think?:

<style>
:link, :visited { text-decoration: none }
:link:hover, :visited:hover { text-decoration: underline }
</style>


Personally, I'd do that the other way around. It means that people can
INSTANTLY see where links are and NOT have to go wavering a mouse all over
the damn page to try and find where the links are, but can read the text of
links without underlines getting in the way when they do hover the mouse
over them.

I tend to hide the underlines for print media though, you can't click on a
piece of paper, and few browsers print out a footer showing where the links
would have lead to.

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please delete some files yourself.
Jul 23 '05 #16
Lachlan Hunt said the following on 12/09/2004 04:23:
Harrie wrote:
Hmmm, I think you're right, but the w3c validator doesn't complain
about it when it's in the <head>. It does if you put it in an external
stylesheet. Is this a bug in the validator or is it simply ignoring
anything between <!-- and -->?
Which validator are you referring to? The Markup validator or the CSS
validator? I'll assume both, since I just checked it and neither
complained. It is still valid markup, so the W3C Markup validator will
not find any errors with it, but it is not checking the validity of the


I was referring to the CSS validator, but I checked them both.
CSS. I believe the CSS validator should find errors with a '//', though
I do not have time to go through the CSS spec to double check. If it's
not allowed within external stylesheets, I would assume the same is true
for internal stylesheets within a <style> element. But, that's more of
a CSS question, which isn't really relevant in ciwah.


I have to do some reading on CSS myself, so I'll check it myself. Thanks
for your input on this.

--
Regards
Harrie
Jul 23 '05 #17
Tim said the following on 12/09/2004 07:06:
On Sat, 11 Sep 2004 13:31:26 +0200,
Harrie <di******************@hotmail.com> posted:
just updated my own stylesheet (I used
a:link, a:visited and a:hover so I got it half right). The same is true
for the first rule I posted, so all should be like this I think?:

<style>
:link, :visited { text-decoration: none }
:link:hover, :visited:hover { text-decoration: underline }
</style>


Personally, I'd do that the other way around. It means that people can
INSTANTLY see where links are and NOT have to go wavering a mouse all over
the damn page to try and find where the links are, but can read the text of
links without underlines getting in the way when they do hover the mouse
over them.


I agree with you, but the OP asked specifically for this. Jukka and I
already pointed out that this is probabbly not a good idea.

--
Regards
Harrie
Jul 23 '05 #18
Harrie wrote:
is this header still needed when one uses inline
stylesheets?:

<meta http-equiv="Content-Style-Type" content="text/css">


That's a new one by me. Where did you learn about this (pseudo-)header?

--
Brian (remove "invalid" to email me)
http://www.tsmchughs.com/
Jul 23 '05 #19
Brian <us*****@julietremblay.com.invalid> wrote:
Harrie wrote:
is this header still needed when one uses inline stylesheets?:

<meta http-equiv="Content-Style-Type" content="text/css">


That's a new one by me. Where did you learn about this (pseudo-)header?


Maybe from the HTML specification?
http://www.w3.org/TR/html4/present/styles.html#h-14.2.1

But I wonder if any browsers or other user agents have ever actually
cared the least about such constructs. After all, they assume CSS (in
some flavor - and you cannot specify the flavor in the media type)
as the style sheet language.

The construct is defined in HTML specs just for theoretical completeness.
Logically, a user agent needs to know what style sheet language is used
in style="..." attributes, so there must be _some_ way to tell the
language. But this doesn't really matter in practice, since CSS has
virtually no competition and is assumed by default.

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

Jul 23 '05 #20
Lachlan Hunt <sp***********@gmail.com> wrote in
news:h2*****************@news-server.bigpond.net.au:
Neal wrote:
On Sat, 11 Sep 2004 02:31:03 +0200, Harrie
<di******************@hotmail.com> wrote:
Try this in the head:

<style>
<!--
a { text-decoration: none }
a:hover { text-decoration: underline }
//-->
</style>


Where you have //-->, it should be /*-->*/ since // is a JavaScript
comment, not a CSS comment. However, it's not completely necessary
for CSS, since CDO '<!--' and CDC '-->' are allowed within CSS, and
thus don't need to be commented out. I think, IIRC, they stand for
Comment Delimiter Open and Close, respectively.


No...

/* --> */ is not a way to do things. The purpose of these is to keep older
browsers from rendering the markup, or perhaps webmail clients from
rendering CSS markup contained within HTML emails. (I have had a problem
with that before.) If you use /* --> */, the "*/" will be _outside_ the
HTML comment, meaning it will appear in the text of the web page on old,
stupid browsers.
Jul 23 '05 #21
Neal <ne*****@yahoo.com> wrote in news:opsd5cp1nm6v6656
@news.individual.net:
On Sat, 11 Sep 2004 02:31:03 +0200, Harrie
<di******************@hotmail.com> wrote:
Try this in the head:

<style>
<!--
a { text-decoration: none }
a:hover { text-decoration: underline }
//-->
</style>

Except leave out the comments - they're useless today. Unless you're
supporting really, really ancient browsers.


That's a silly argument. Some people might have a reason to be in a
situation where they can use nothing but these ancient browsers. Maybe
they're poor. Including <!-- and --> does not cause _any_ problems, and
leaving them out doesn't cause any important problems either, and there's
no reason to sabatoge your code just so you can screw over older browsers.
Jul 23 '05 #22
wrjames.remove@spamOn Tue, 14 Sep 2004, Sam Hughes wrote:
That's a silly argument. Some people might have a reason to be in a
situation where they can use nothing but these ancient browsers.
Pre-HTML3.2 browsers? They're essentially useless nowadays, because
they typically don't support name-based virtual hosts either.
Maybe they're poor.
Then they should run a modern browser like Lynx.
Including <!-- and --> does not cause _any_ problems,


Don't try this with XHTML, children...

Ideally, of course, one would not have <style ...> element content
anyway: it's best delegated to a (cacheable) style file, leaving your
pre-HTML3.2 browsers in peace, and curing the problem that you're
worrying about entirely, without any side-effects.

Jul 23 '05 #23
Jukka K. Korpela said the following on 14/09/2004 22:36:
Brian <us*****@julietremblay.com.invalid> wrote:

Harrie wrote:

is this header still needed when one uses inline stylesheets?:

<meta http-equiv="Content-Style-Type" content="text/css">


That's a new one by me. Where did you learn about this (pseudo-)header?

Maybe from the HTML specification?
http://www.w3.org/TR/html4/present/styles.html#h-14.2.1


Unfortunately I'm still reading that one and haven't come to chapter 14
yet :(

I read it some time ago on:

http://www.htmlhelp.com/reference/cs....html#inlining

(that's also where I learned to comment out inline styles, but Neal
already pointed out that this is not needed anymore)

--
Regards
Harrie
Jul 23 '05 #24
Sam Hughes said the following on 14/09/2004 22:44:
Lachlan Hunt <sp***********@gmail.com> wrote in
news:h2*****************@news-server.bigpond.net.au:
On Sat, 11 Sep 2004 02:31:03 +0200, Harrie
<di******************@hotmail.com> wrote:

Try this in the head:

<style>
<!--
a { text-decoration: none }
a:hover { text-decoration: underline }
//-->
</style>


Where you have //-->, it should be /*-->*/ since // is a JavaScript
comment, not a CSS comment. However, it's not completely necessary
for CSS, since CDO '<!--' and CDC '-->' are allowed within CSS, and
thus don't need to be commented out. I think, IIRC, they stand for
Comment Delimiter Open and Close, respectively.


No...

/* --> */ is not a way to do things. The purpose of these is to keep older
browsers from rendering the markup, or perhaps webmail clients from
rendering CSS markup contained within HTML emails. (I have had a problem
with that before.) If you use /* --> */, the "*/" will be _outside_ the
HTML comment, meaning it will appear in the text of the web page on old,
stupid browsers.


Looks to me like you have a very valid point here.

I think for the STYLE attribute the end comment (-->) doesn't have to be
commented out (by //), I probably confused myself with JavaScript.

I don't use inline or embedded styles that much anyway, only sometimes
just for a quick test scenario. And I try to stay away from scripts
altogether.

--
Regards
Harrie
Jul 23 '05 #25
On Sun, 12 Sep 2004 00:49:17 GMT, Lachlan Hunt <sp***********@gmail.com>
wrote:
Neal wrote:
On Sat, 11 Sep 2004 02:31:03 +0200, Harrie
<di******************@hotmail.com> wrote:
Try this in the head:

<style>
<!--
a { text-decoration: none }
a:hover { text-decoration: underline }
//-->
</style>
Where you have //-->, it should be /*-->*/ since // is a JavaScript
comment, not a CSS comment.
Well; the original /background/ of the '<!--' and '//-->' constructs
inside the style element is that the MDO+COM 'prolog' and the COM+MDC
'epilogue' was allowed by CSS in order to allow for a way to 'comment
out' the already CDATA classified content of the STYLE element from
ancient browsers that had no internal knowledge of how to handle an
unknown STYLE element.

This then lead to the idea that since the SGML/CRS standard COM+MDC
string had a special meaning to J(ava)script engines it might be a
"good" idea to hide that one from such engines by the use of an initial
'//' J(ava)script line comment start.

All of this is just "mumbo jumbo" of course, the correct solution to all
"problems" like this is to treat the STYLE element and its attribute
counterpart as "persona non grata" in any www page markup.
However, it's not completely necessary for CSS, since CDO '<!--' and
CDC '-->' are allowed within CSS
Actually there is no such thing as 'CDO' and 'CDC' defined in CSS
formality. What is there is an internal grammar definition of values to
be returned by a CSS parser upon the encounter of the SGML sequences
MDO+COM and COM+MDC.

But note that...

<!-- This is a fully valid HTML (SGML) comment -->

<!--
And this is another fully valid HTML (SGML) comment
--
I can not find that a CSS parser must return CDC for the COM+MDC in the
second comment example, unless its spelled out (in some place I can not
find at the moment) that the same parser must eliminate white space down
to zero.
...If the the style sheet needs to contain either '&' or '<'
for whatever reason, then the comment delimiters are needed,
otherwise it will be invalid markup.
The STYLE element content is CDATA per definition.

Following that, the only character sequence you need to watch out for is
'</' i.e. ETAGO in SGML lingo.

Still as per definition; the first occurrence of an ETAGO, inside a
stream of CDATA, terminates the parsers CDATA scanning state and reverts
it back to a PCDATA parsing state.

[...]
<style type="text/css"><!--/*--><![CDATA[/*><!--*/
x:before { content: '<'; }
x:after { content: '>'; }
/*]]>*/--></style>
Thanks for the best illustration I have seen so far as to why XHTML (and
the STYLE element) in its current status shall be shunned by decent www
authors.

P.S. (from SGML and its CRS)

CRS = Concrete Reference Syntax
<! = MDO = Markup Declaration Open = MDC = Markup Declaration Close -- = COM = COMment start/end
< = STAGO = Start TAG Open
</ = ETAGO = End TAG Open = TAGC = TAG Close


CDATA = Character DATA
(data that is not processed by a parser, only scanned for
a first occurrence of ETAGO)

PCDATA = Parsed Character DATA
(data that is processed, as per markup application
requirements, by a parser)

--
Rex
Jul 23 '05 #26
Sam Hughes <hu****@rpi.edu> writes:
Neal <ne*****@yahoo.com> wrote in news:opsd5cp1nm6v6656
@news.individual.net:
On Sat, 11 Sep 2004 02:31:03 +0200, Harrie
<di******************@hotmail.com> wrote:
<style>
<!--
a { text-decoration: none }
a:hover { text-decoration: underline }
//-->
</style>


Except leave out the comments - they're useless today. Unless you're
supporting really, really ancient browsers.


That's a silly argument. Some people might have a reason to be in a
situation where they can use nothing but these ancient browsers. Maybe


The ancient browsers in question are Netscape 1, Lynx 2-4, and Mosaic.
Possibly IE1 and/or IE2 but I don't have those available to test.

I don't believe any of those browsers see use outside testing
environments any more.

--
Chris
Jul 23 '05 #27
"Alan J. Flavell" <fl*****@ph.gla.ac.uk> writes:
wrjames.remove@spamOn Tue, 14 Sep 2004, Sam Hughes wrote:
That's a silly argument. Some people might have a reason to be in a
situation where they can use nothing but these ancient browsers.


Pre-HTML3.2 browsers? They're essentially useless nowadays, because
they typically don't support name-based virtual hosts either.


A couple of years ago a friend's NS4 installation broke. The machine
also had IE1 on it. So, "no problem, just use that that to download a
modern browser", I think.

It took absolutely *ages* to find a browser download site that
*didn't* use name-based vhosts. I think eventually I ended up going
away to a more normal internet connection and writing down an FTP
address.

As you say, if anyone is still using IE1, the occasional CSS rule at
the top of pages will be the least of their worries...

--
Chris
Jul 23 '05 #28
Jukka K. Korpela wrote:
Brian wrote:

Harrie wrote:
<meta http-equiv="Content-Style-Type" content="text/css">


That's a new one by me. Where did you learn about this
(pseudo-)header?

Maybe from the HTML specification?
http://www.w3.org/TR/html4/present/styles.html#h-14.2.1


Right. I was thinking of http specs when I posed my question, but of
course there can be headers other than those listed there. Apologies for
not thinking this through.

--
Brian (remove "invalid" to email me)
http://www.tsmchughs.com/
Jul 23 '05 #29
Chris Morris wrote:
The ancient browsers in question are Netscape 1, Lynx 2-4, and
Mosaic.


Lynx 2-4? The newest version is 2.8.5, isn't it? What's Lynx 4? And why
are you designating new versions "ancient"?

--
Brian (remove "invalid" to email me)
http://www.tsmchughs.com/
Jul 23 '05 #30

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Jean-Fran?ois Lacrampe | last post by:
Hello, I want to write a _very_ simple text parser that would replace a string like: "This is text with /italics/, *bold* and _underline_." and generate automatically something like this: ...
7
by: LRW | last post by:
Below I'll paste my CSS and the HTML in question. But what's happening is, I'm trying to establish a link behavior for a class that's separate from the normal link class. I've established a: 's...
2
by: Kevin Lyons | last post by:
Hello, Can anyone assist me with what I am trying to do with the following code (six different scenarios to try to make the functionality work correctly)? I want to always (and ONLY) display...
6
by: JimO | last post by:
Is there any way to reset a link's state. In other words reset a visited link to an unvisited link. I guess the question I'm asking would be how do you programatically search and clear the...
3
by: shapper | last post by:
Hello, How to make the underline of a link to be a dotted line like in this web site: http://www.iconbuffet.com/ Thanks, Miguel
6
by: shyamg | last post by:
hi i given a link in jsp how to use links for with out under line in Mozill Firefox
4
by: Mr. Newt | last post by:
Hi y'all, I'm looking to put an underline under some links but not under others. I still want an underline when the link is hovered over. I've dabbled with classes for this, but all I can get...
14
by: Daniel Kaplan | last post by:
So my style sheet has many different types of LINK styles. And they all work fine on IE, even different styles on the same page. But in Firefox, all link throughout my site all follow JUST the...
10
by: JD | last post by:
I've seen websites where the link underline is a different colour to the link text. I've also seen links with dotted underlines (see the hover effect on the 'Change' and 'All Microsoft Sites' links...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.