Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Styling links inside a <SPAN>

41 views
Skip to first unread message

Swifty

unread,
Apr 12, 2012, 4:20:57 AM4/12/12
to
I have defined a class, "sunset" as:

.sunset {color:red}

Can I add things like:

a:link {color:#611}

... into the "sunset" class, such that all links inside a <SPAN
CLASS=sunset> inherit the #611 colour?

--
Steve Swift
http://www.swiftys.org.uk/swifty.html
http://www.ringers.org.uk

dorayme

unread,
Apr 12, 2012, 6:52:58 AM4/12/12
to
In article <9q3do7hdqgsmh8bhn...@4ax.com>,
Swifty <steve....@gmail.com> wrote:

> I have defined a class, "sunset" as:
>
> .sunset {color:red}
>
> Can I add things like:
>
> a:link {color:#611}
>
> ... into the "sunset" class, such that all links inside a <SPAN
> CLASS=sunset> inherit the #611 colour?

<style type="text/css" media="screen">
.sunset {color:red}
</style>

<body>
<p class="sunset">Text...</p>
</body>

would normally get you red text.

If you wanted the text in

<body>
<p class="sunset"><a href="somewhere.html>Text...</a></p>
</body>

to be other than some default colour (reliant on browser CSS, it would
*not* be red, it would be blue) for unvisited links, you add a style
for links in the CSS.

<style type="text/css" media="screen">
.sunset {color:red}
a:link {color:#611}
</style>

These two are independent styles in that one is for text in any
element of class "sunset" and which will come out red if it is not
overridden by some other CSS. The a:link selector in the extra style
above does not override the .sunset color, it generally overrides the
hidden default style for links. If you left out the sunset class
altogether and had no rule for it, but just had your link rules, you
would also get the #611 colour for the link text.

--
dorayme

Scott Johnson

unread,
Apr 12, 2012, 8:51:27 AM4/12/12
to
On 4/12/2012 1:20 AM, Swifty wrote:
> I have defined a class, "sunset" as:
>
> .sunset {color:red}
>
> Can I add things like:
>
> a:link {color:#611}
>
> ... into the "sunset" class, such that all links inside a<SPAN
> CLASS=sunset> inherit the #611 colour?
>

Yes

Just follow the parent class with the descendent class with a single
space in between

<style type="text/css" media="screen">
.sunset {color:red}
a:link {color:#611}

.sunset a:link {color:yellow}

</style>

<span class='sunset'>Simple Span and <a href='#'>Spanned Link</a></span>
against an <a href='#'>Unspanned Link</a>

This also may help down the road
http://www.w3.org/TR/CSS2/

Jukka K. Korpela

unread,
Apr 12, 2012, 9:43:18 AM4/12/12
to
2012-04-12 11:20, Swifty wrote:

> I have defined a class, "sunset" as:
>
> .sunset {color:red}

Technically, we don't define classes, we just use them. The above is
just a CSS rule that uses a class selector.

By the way, what happens if there is a user style sheet
* { background: red; color: white; }
? (Just a rhetorical question to convey the message "always declare
color and background together".)

> Can I add things like:
>
> a:link {color:#611}
>
> ... into the "sunset" class,

That thing has nothing to do with classes.

> such that all links inside a <SPAN
> CLASS=sunset> inherit the #611 colour?

Links do not inherit colors, since links have default colors set in
browser default style sheets.

To make all links inside <SPAN CLASS=sunset>...</SPAN> appear in #611
colors, use

.sunset :link, .sunset :visited {
color: #611;
background: white; /* or some other suitable value */
}

This will remove the difference between unvisited and visited links and
get you low grades in usability.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Philip Herlihy

unread,
Apr 12, 2012, 9:46:32 AM4/12/12
to
In article <9q3do7hdqgsmh8bhn...@4ax.com>,
steve....@gmail.com says...
>
> I have defined a class, "sunset" as:
>
> .sunset {color:red}
>
> Can I add things like:
>
> a:link {color:#611}
>
> ... into the "sunset" class, such that all links inside a <SPAN
> CLASS=sunset> inherit the #611 colour?

Yes (but)...

I had to think about this, as it's not the way I'd usually do things
(but then, I'm no guru here). Here's some code:

####################

<style type="text/css">
<!--
p {
color: blue;
font-style:italic;
}
.sunset {
color: red;
font-style: normal;
}
a:link {
color: green;
font-weight: bold;
}
-->
</style>

...
<p>This is my <span class="sunset">sunset text</span> in an otherwise
unremarkable paragraph.</p>
<p>This is my <span class="sunset">sunset text with a <a href="#"
title="dummy link">link</a> now </span>in an otherwise unremarkable
paragraph.</p>

##################

The normal rule of "specificity" applies, meaning broadly that the rule
with the most precise match will take priority over a more general
match. In this case the link appears green rather than red, as the
a:link selector is more specific than the SPAN one (and the SPAN itself
is more specific than the rules which might apply the the containing
paragraph).

However, there's more to specificity than just how deeply the nesting
goes. You might like to look at one or more of these articles:

http://www.htmldog.com/guides/cssadvanced/specificity/
http://css-tricks.com/specifics-on-css-specificity/
http://reference.sitepoint.com/css/specificity

So you probably want to work on your selectors a bit, or you'll find
that some change you make later down the road has unexpected side
effects! Your code (ok, obviously example code) refers to any link,
whereas you'll probably want to distinguish links in a navigation
structure from any old inline link provided for visitors to follow up a
reference if they want to. I usually put "navigation" links within LI
items within a UL. I put a class or ID on the UL, and then refer to the
links in CSS like this:

UL.nav li a:link,
UL.nav li a:visited { color: nice;}
UL.nav li a:hover,
UL.nav li a:active { color: nicer;}

Note that your browser will have a "default stylesheet" (that's why even
unstyled H1 elements look more prominent than unstyled H2 elements) and
this default stylesheet will normally contain rules for the four
different attributes a link can take, so if you don't provide your own,
you may find the link looks different after you've visited it and
returned back!

For ordinary inline links you could either put in a set of default link
styles:

a:link,
a:visited { some stuff}
a:hover,
a:active { other stuff}

... and then make sure that any links which ought to look different have
more specific CSS selectors (like the links in my UL.nav above), or you
could give an explicit class to your ordinary links, like this:

a.vanilla:link,
a.vanilla:visited { some stuff}
a.vanilla:hover,
a.vanilla:active { other stuff}

or maybe put in a rule that would pick out links which happened to be in
any paragraph:
p a:link,
p a:visited {some stuff}
p a:hover,
p a:active { other stuff}

Returning to the specifics of your question, consider this CSS:

.sunset a:link {color: #611;}



An interesting question, as it's made me think hard about some
fundamental issues. Hope my answer is too.

CSS is easy to learn. In fact, it's no harder to learn than Chinese -
and one in four of the world's children are pretty fluent in Chinese by
the time they are five years old.

--

Phil, London

Jukka K. Korpela

unread,
Apr 12, 2012, 10:07:29 AM4/12/12
to
2012-04-12 16:46, Philip Herlihy wrote:

> <p>This is my <span class="sunset">sunset text with a <a href="#"
> title="dummy link">link</a> now</span>in an otherwise unremarkable
> paragraph.</p>
>
> ##################
>
> The normal rule of "specificity" applies, meaning broadly that the rule
> with the most precise match will take priority over a more general
> match.

No, specificity is not involved here at all. Any rule with SPAN as the
selector simple does not apply to an A element at all.

If the A element did not have the HREF element, it would not be a link
and would not have default color as per browser style sheet. Then it
would inherit color from its parent. Even here, specificity would not
matter at all.

If the document sets color on the A element, say a:link { color: green
}, then specificity _still_ doesn't get involved, since the rule,
specified in a document style sheet (author style sheet) trumps the rule
in a brower style sheet, regardless of specificity.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Andreas Prilop

unread,
Apr 12, 2012, 11:34:37 AM4/12/12
to
On Thu, 12 Apr 2012, Philip Herlihy wrote:

> <style type="text/css">
> <!--

It is really nice that you care about readers with Netscape 2!
But so many users now have already Netscape 3. And Netscape 3
doesn’t need these stupid pseudo-comments any longer.

You should also try Netscape 3!

--
In memoriam Alan J. Flavell
http://www.alanflavell.org.uk/charset/

Philip Herlihy

unread,
Apr 12, 2012, 11:57:08 AM4/12/12
to
In article <jm6niv$4h4$1...@dont-email.me>, jkor...@cs.tut.fi says...
Interested to read your welcome comments (and I said I wasn't any sort
of guru). Perhaps 'specificity' means something more particular (trying
to avoid the word 'specific' here!), as described in those three
articles I cited. However, if you have a span within a paragraph within
a div within a body, and each has a {color:something-different} set,
then at each level the styles affecting the container will be overridden
by the styles declared for the child. Perhaps 'inheritance' and
'specificity' are independent issues that I've been failing to
distinguish correctly?

Now, some browsers have editable default style sheets. If you removed
the default rules for a:link (etc), and had a functional link within a
span, would not the link text inherit the styles of the parent span?

Similarly, if you edited the browser style sheet so that it was very
specific (e.g. including an ID), then would that trump a less-specific
author style sheet, according to the specificity calculations outlined
in those three articles?

--

Phil, London

Philip Herlihy

unread,
Apr 12, 2012, 12:06:00 PM4/12/12
to
In article <Pine.LNX.4.64.12...@zen.rrzn.uni-hannover.de>,
prilo...@trashmail.net says...
>
> On Thu, 12 Apr 2012, Philip Herlihy wrote:
>
> > <style type="text/css">
> > <!--
>
> It is really nice that you care about readers with Netscape 2!
> But so many users now have already Netscape 3. And Netscape 3
> doesn?t need these stupid pseudo-comments any longer.
>
> You should also try Netscape 3!

:-)

Dreamweaver CS4 puts in these comments automatically, and I did actually
wonder this time whether to include them in the post!

I'm actually much more dismissive of old browsers than this suggests,
and that includes IE6. I take the view that anyone still using that old
warhorse will expect web pages to look all wrong, and why should mine be
any different? I test what I write in IE9, plus the latest Firefox,
Chrome and Safari (Windows version). Apart from some deviant (?)
Javascript behaviour recently noted in the very latest Safari, they
hardly ever vary by so much as a pixel, so the days of agonising over
NN4 and IE5 are long gone for me!

--

Phil, London

Andreas Prilop

unread,
Apr 12, 2012, 12:37:00 PM4/12/12
to
On Thu, 12 Apr 2012, Philip Herlihy wrote:

>>> <style type="text/css">
>>> <!--
>
> Dreamweaver CS4 puts in these comments automatically,

What does this tell us about the programmers of Dreamweaver CS4?

> I test what I write in IE9, plus the latest Firefox,
> Chrome and Safari (Windows version).

Test with
http://www.user.uni-hannover.de/nhtcapri/temp/no-comment.var.html

David Stone

unread,
Apr 12, 2012, 2:44:22 PM4/12/12
to
In article
<Pine.LNX.4.64.12...@zen.rrzn.uni-hannover.de>,
Andreas Prilop <prilo...@trashmail.net> wrote:

> On Thu, 12 Apr 2012, Philip Herlihy wrote:
>
> >>> <style type="text/css">
> >>> <!--
> >
> > Dreamweaver CS4 puts in these comments automatically,
>
> What does this tell us about the programmers of Dreamweaver CS4?

They suffer from inertia? Of course, it's often easier to leave
obsolete features in than take them out - that way, the feature
count always increases!

David Stone

unread,
Apr 12, 2012, 2:46:56 PM4/12/12
to
In article <MPG.29f10db49...@news.demon.co.uk>,
Philip Herlihy <bounc...@you.com> wrote:

> In article <Pine.LNX.4.64.12...@zen.rrzn.uni-hannover.de>,
> prilo...@trashmail.net says...
> >
> > On Thu, 12 Apr 2012, Philip Herlihy wrote:
> >
> > > <style type="text/css">
> > > <!--
> >
> > It is really nice that you care about readers with Netscape 2!
> > But so many users now have already Netscape 3. And Netscape 3
> > doesn?t need these stupid pseudo-comments any longer.
> >
> > You should also try Netscape 3!
>
> :-)
>
> Dreamweaver CS4 puts in these comments automatically, and I did actually
> wonder this time whether to include them in the post!
>
> I'm actually much more dismissive of old browsers than this suggests,
> and that includes IE6.

I was looking for something the other day, and ran into a site
promoting educational "virtual lab" modules for chemical analysis.

On CD-ROM.

For Windows 95.

"Best-viewed in IE 4"

Nice to know that people keep things up-to-date!

Philip Herlihy

unread,
Apr 12, 2012, 3:11:45 PM4/12/12
to
> On Thu, 12 Apr 2012, Philip Herlihy wrote:
>
> >>> <style type="text/css">
> >>> <!--
> >
> > Dreamweaver CS4 puts in these comments automatically,
>
> What does this tell us about the programmers of Dreamweaver CS4?
>
> > I test what I write in IE9, plus the latest Firefox,
> > Chrome and Safari (Windows version).
>
> Test with
> http://www.user.uni-hannover.de/nhtcapri/temp/no-comment.var.html

That's interesting: the W3 validator says:

"Do not put style rules inside HTML comments as they may be removed by
user agent"

I note you're using a different DOCTYPE than the one supplied by default
by Dreamweaver - I wonder if that's why the styles aren't being observed
in any of those four browsers? (I'd experiment if I wasn't about to go
out...)

--

Phil, London

Jukka K. Korpela

unread,
Apr 12, 2012, 3:27:01 PM4/12/12
to
2012-04-12 22:11, Philip Herlihy wrote:

>> http://www.user.uni-hannover.de/nhtcapri/temp/no-comment.var.html
>
> That's interesting:

The point is that in "genuine" XHTML, the content of a <style> element
is treated as #PCDATA, parsed character data. This means that <!-- xxx
--> _is_ a comment and may be removed by the browser before the content
is passed to the component that interprets CSS code.

So far from "protecting" anything, the "<!--" and "-->" constructs may
mask out a style sheet.

> the W3 validator says:
>
> "Do not put style rules inside HTML comments as they may be removed by
> user agent"

Does it? Where? It would be a useful warning, but I haven't seen it.

> I note you're using a different DOCTYPE than the one supplied by default
> by Dreamweaver

The crucial thing is that the document is served with a genuine XHTML
media type: the HTTP headers say
Content-Type: application/xhtml+xml

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Philip Herlihy

unread,
Apr 12, 2012, 3:31:02 PM4/12/12
to
In article <MPG.29f139429...@news.demon.co.uk>,
bounc...@you.com says...
Couldn't resist (so I'm now late). Changing the DOCTYPE made no
difference, but changing the file extension to .htm instead of .xhtml
was enough to make the browser observe the styles. Both Dreamweaver and
MS Word (the default editor for this extension on my PC!) recognised the
styles in both versions.

I've never found time to go into the mysteries of either DOCTYPEs or
XHTML (and I have quite enough trouble with CSS, thank you) but I have
to say I'm not aware of any benefit of using XHTML (which doesn't mean
there isn't one).

Definitely not a guru...

--

Phil, London

Philip Herlihy

unread,
Apr 12, 2012, 3:36:27 PM4/12/12
to
In article <jm7aa3$njm$1...@dont-email.me>, jkor...@cs.tut.fi says...
>
> 2012-04-12 22:11, Philip Herlihy wrote:
>
> >> http://www.user.uni-hannover.de/nhtcapri/temp/no-comment.var.html
> >

>
> > the W3 validator says:
> >
> > "Do not put style rules inside HTML comments as they may be removed by
> > user agent"
>
> Does it? Where? It would be a useful warning, but I haven't seen it.

Feed the "No Comment!" URL into this:
http://jigsaw.w3.org/css-validator/

>
> > I note you're using a different DOCTYPE than the one supplied by default
> > by Dreamweaver
>
> The crucial thing is that the document is served with a genuine XHTML
> media type: the HTTP headers say
> Content-Type: application/xhtml+xml

Studying the reference on DOCTYPEs I was given recently is still on my
(long!) to-do list. I guess I ought to see what relevant options exist
in Dreamweaver too!

--

Phil, London

Jukka K. Korpela

unread,
Apr 12, 2012, 3:37:29 PM4/12/12
to
2012-04-12 18:57, Philip Herlihy wrote:

> Perhaps 'specificity' means something more particular (trying
> to avoid the word 'specific' here!), as described in those three
> articles I cited.

'Specificity' is a technical term in CSS and refers to a property of
selectors, e.g. p#foo or mere #p is more specific than p.

> However, if you have a span within a paragraph within
> a div within a body, and each has a {color:something-different} set,
> then at each level the styles affecting the container will be overridden
> by the styles declared for the child.

That's one way of putting it, but to put it more directly, the span
element has its own color. If not color were assigned to it, it would
inherit color from its parent.

> Perhaps 'inheritance' and
> 'specificity' are independent issues

Yes.

> Now, some browsers have editable default style sheets. If you removed
> the default rules for a:link (etc), and had a functional link within a
> span, would not the link text inherit the styles of the parent span?

If it is possible to remove the default rules and if no style sheet
assigns properties to the link, then yes, it would inherit color and
some other properties from its parent.

> Similarly, if you edited the browser style sheet so that it was very
> specific (e.g. including an ID), then would that trump a less-specific
> author style sheet, according to the specificity calculations outlined
> in those three articles?

No, because author style sheet trumps browser style sheets. This
criterion is applied before even considering specificity. But
specificity becomes relevant e.g. when you have two author style sheets,
like a company style sheet and a style sheet written for a particular page.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Philip Herlihy

unread,
Apr 12, 2012, 3:58:43 PM4/12/12
to
In article <jm7atn$rj9$1...@dont-email.me>, jkor...@cs.tut.fi says...
Thanks. I bet I've learned no less than the OP in all this - much
appreciated.

Just watched an entertaining short video (3:51) on design (not
specifically web design) around a 'Titanic' theme. It's a very good
site, with some really interesting videos, and an engaging presenter.

http://www.bamagazine.com/

I need to take a month off work and read some design books...

--

Phil, London

Jukka K. Korpela

unread,
Apr 12, 2012, 4:08:09 PM4/12/12
to
2012-04-12 22:36, Philip Herlihy wrote:

>>>> http://www.user.uni-hannover.de/nhtcapri/temp/no-comment.var.html
>>
>>> the W3 validator says:
>>>
>>> "Do not put style rules inside HTML comments as they may be removed by
>>> user agent"
>>
>> Does it? Where? It would be a useful warning, but I haven't seen it.
>
> Feed the "No Comment!" URL into this:
> http://jigsaw.w3.org/css-validator/

I see... the W3C CSS linter, which they misleadingly call a "validator",
issues that warning *and* it itself removes the style sheet: "No style
sheet found". Yet it says:

"Congratulations! No Error Found.

This document validates as CSS level 2.1 !

To show your readers that you've taken the care to create an
interoperable Web page, you may display this icon on any page that
validates."

And it says all this even if you transmogrify the style sheet to a
grotesque mess that violates CSS rules in all possible ways - provided
just that you "protect" it with "<!--" and "-->".

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Swifty

unread,
Apr 13, 2012, 6:40:36 AM4/13/12
to
On Thu, 12 Apr 2012 05:51:27 -0700, Scott Johnson
<noon...@chalupasworld.com> wrote:

>Just follow the parent class with the descendent class with a single
>space in between

Spectacular! Thank you.

Although I chose sunset colours (and you followed suit), in this case
my "sunset" class will apply to notices that my webpages are to be
"sunset" by the time I retire in another 509 Days, 12 Hours, 20
Minutes, 37 Seconds. (See http://www.swiftys.org.uk/retire)

Swifty

unread,
Apr 13, 2012, 6:55:04 AM4/13/12
to
On Thu, 12 Apr 2012 17:06:00 +0100, Philip Herlihy
<bounc...@you.com> wrote:

>I take the view that anyone still using that old
>warhorse will expect web pages to look all wrong

Bear in mind that some of us were using IE6 until quite recently, as
we had no other choice.

In my case, I work for a large corporation which supplies my primary
PC. They have myriad web-based applications, and until recently not
all of these could cope with IE7 and beyond.

Some of these applications were from 3rd-party suppliers. Of course,
it's shameful that they didn't include IE7 support sooner (and
8/9/etc) but that was beyond our control. Migrating away from such
applications in an organisation as large as our is a complete
nightmare (even when the proposed replacement claims 100%
compatibility).

So, we (the end users of the entire process) had to sit tight. Some,
like me, migrated to IE8. But that was at our own risk. And we're
fortunate that our employer allows us such choices; many do not.

So, until recently I had to design my webpages on the assumption that
50% of the audience would have IE6. Since most of my HTML skills
crystallised during the heyday of IE6, that's not as hard as it
sounds.

We've now moved on, but as WinXP is the predominant OS in our
organisation, I'm now limited by IE8. It's a lot easier though.

Scott Johnson

unread,
Apr 13, 2012, 8:43:42 AM4/13/12
to
On 4/13/2012 3:40 AM, Swifty wrote:
> On Thu, 12 Apr 2012 05:51:27 -0700, Scott Johnson
> <noon...@chalupasworld.com> wrote:
>
>> Just follow the parent class with the descendent class with a single
>> space in between
>
> Spectacular! Thank you.
>
> Although I chose sunset colours (and you followed suit), in this case
> my "sunset" class will apply to notices that my webpages are to be
> "sunset" by the time I retire in another 509 Days, 12 Hours, 20
> Minutes, 37 Seconds. (See http://www.swiftys.org.uk/retire)
>

Your most welcome.

Dang I still have 5475 days to go. :(

Well you have a wonderful retirement.

Andreas Prilop

unread,
Apr 13, 2012, 11:50:56 AM4/13/12
to
On Thu, 12 Apr 2012, Philip Herlihy wrote:

>>> IE9, plus the latest Firefox, Chrome and Safari (Windows version)
>>
>> http://www.user.uni-hannover.de/nhtcapri/temp/no-comment.var.html
>
> I note you're using a different DOCTYPE than the one supplied
> by default by Dreamweaver

And that default is?

> I wonder if that's why the styles aren't being observed in any
> of those four browsers?

There are no styles in the above document, only a comment.
Internet Explorer up to version 8 shows something completely
different; probably the same as IE 9 in compatibility mode.

--
From the New World:
http://www.google.com/search?ie=ISO-8859-2&q=Dvofi%E1k

Andreas Prilop

unread,
Apr 13, 2012, 11:52:19 AM4/13/12
to
On Fri, 13 Apr 2012, Swifty wrote:

> Bear in mind that some of us were using IE6 until quite recently,
> as we had no other choice.

Windows 2000 allows only Internet Explorer 6, not version 7.

Andreas Prilop

unread,
Apr 13, 2012, 12:00:06 PM4/13/12
to
On Thu, 12 Apr 2012, Jukka K. Korpela wrote:

>>>>> http://www.user.uni-hannover.de/nhtcapri/temp/no-comment.var.html
>
> This document validates as CSS level 2.1 !
>
> And it says all this even if you transmogrify the style sheet to
> a grotesque mess that violates CSS rules in all possible ways -
> provided just that you "protect" it with "<!--" and "-->".

There is nothing violated, nothing protected; there is just a comment.
I think http://jigsaw.w3.org/css-validator/ is correct here.

But I strongly believe that it should show a warning for
http://www.user.uni-hannover.de/nhtcapri/temp/no-comment.html
There is absolutely no warning about these pseudo-comments
even though the document is XHTML 1.1.

Jukka K. Korpela

unread,
Apr 13, 2012, 12:18:50 PM4/13/12
to
2012-04-13 19:00, Andreas Prilop wrote:

> On Thu, 12 Apr 2012, Jukka K. Korpela wrote:
>
>>>>>> http://www.user.uni-hannover.de/nhtcapri/temp/no-comment.var.html
>>
>> This document validates as CSS level 2.1 !
>>
>> And it says all this even if you transmogrify the style sheet to
>> a grotesque mess that violates CSS rules in all possible ways -
>> provided just that you "protect" it with "<!--" and "-->".
>
> There is nothing violated, nothing protected; there is just a comment.

Formally speaking, yes. But "This document validates as CSS level 2.1 !"
is not formal talk, and "Congratulations", is even less, and "you've
taken the care to create an interoperable Web page" is worse than marketese.

> I think http://jigsaw.w3.org/css-validator/ is correct here.

I don't think it is adequate to congratulate the user that way,
especially since we know that the user actually wants the stuff between
"<!--" and "-->" to be a style sheet and the linter does not check at
all. And saying that a document with an empty style sheet "validates as
CSS level 2.1 !" helps no one.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Philip Herlihy

unread,
Apr 14, 2012, 2:00:55 PM4/14/12
to
Even Win2K runs Firefox!

--

Phil, London

Ben C

unread,
Apr 19, 2012, 3:11:42 PM4/19/12
to
Windows XP refuses to run IE9, which is their first half-decent release
of that browser. Even to install IE8 you have to mess around with
obscure "service packs" and run command line autoupdaters that need
newer service packs than the ones they're trying to install and thus
fail silently and with no error messages. Don't ask me how I know this.
But to install Firefox (or chrome) on the same OS is one click and takes
2 minutes.

Ed Mullen

unread,
Apr 19, 2012, 3:28:57 PM4/19/12
to
Interesting. I have two XP Pro SP3 systems here and upgrading to IE8
was a simple Windows Update process.

--
Ed Mullen
http://edmullen.net/
That's the beer that made Mel Famie walk us.

dorayme

unread,
Apr 19, 2012, 6:39:55 PM4/19/12
to
In article <5imej3....@news.alt.net>,
I installed an XP Pro on a machine that had 98 on it and it took ages
but it all seemed to update to the latest of everything, me not doing
much - save for having a loaded shotgun pointed at the online updating
dialog boxes. Even on a Mac when installing XP Pro in Virtual Box, it
surprised me how it all just worked and updated to the IE8 - yes, the
shotgun was loaded for that too. Maybe I was just plain lucky or maybe
Ben was too nice about it and used no threats. He is right, of course,
about IE9, but, I think, there are ways to get IE9 (at least on a Mac)
without the official MS OS.

--
dorayme

Ed Mullen

unread,
Apr 19, 2012, 10:16:07 PM4/19/12
to
One interesting thing. I NEVER, for many years, "upgrade" a Windows
system. I always insist on getting at least an OEM full version of
Windows (if not a retail version) with a new machine. And the first
thing I do is wipe the drive and do a new install of Windows. My
retailer (http://www.visioncomputers.com/index.asp) thinks I'm crazy but
they have to admit they've never heard a tech support request from me
except for a hardware issue.

Of course, I do kinda know what I'm doing. This is, obviously, not for
the average bear. But it sure does mean I know what's going on with my
systems.

By the way, if you DO need support, their average hold time is about 15
seconds. And they know what they are talking about. And for non-techie
users, the have remote support software that lets them get into your
machine and restore and fix things the non-techie user has screwed up.

--
Ed Mullen
http://edmullen.net/
Cogito ergo spud. I think, therefore I yam.

Ben C

unread,
Apr 20, 2012, 3:49:59 AM4/20/12
to
On 2012-04-20, Ed Mullen <e...@edmullen.net> wrote:
[...]
> One interesting thing. I NEVER, for many years, "upgrade" a Windows
> system. I always insist on getting at least an OEM full version of
> Windows (if not a retail version) with a new machine. And the first
> thing I do is wipe the drive and do a new install of Windows.

The first thing I do is wipe the drive, do a new install of GNU/Linux
and then try, usually without success, to get a refund of my Microsoft
tax.

Then years later I wanted to test something in IE and found the rescue
disks that came with an old laptop. So I restored it to its original
Windows XP state that I had never before used, found it had IE6 on it,
and tried to put IE8 on. It was then I found I needed all these service
packs and autoupdaters.

Eventually I got it to work by using the "professional" much bigger
service pack downloads their website kept protesting I didn't need.

Any reasonable people would have provided at least Linux binaries of
their browsers for people to test things in in the first place. But not
only do their tie their lousy browsers absolutely to their lousy OS--
they make it about 400 times harder to install them _even on that OS_
than any other browser!

David Stone

unread,
Apr 20, 2012, 8:50:48 AM4/20/12
to
In article <slrnjp2597....@bowser.marioworld>,
Ben C <spam...@spam.eggs> wrote:

> On 2012-04-20, Ed Mullen <e...@edmullen.net> wrote:
> [...]
> > One interesting thing. I NEVER, for many years, "upgrade" a Windows
> > system. I always insist on getting at least an OEM full version of
> > Windows (if not a retail version) with a new machine. And the first
> > thing I do is wipe the drive and do a new install of Windows.
>
> The first thing I do is wipe the drive, do a new install of GNU/Linux
> and then try, usually without success, to get a refund of my Microsoft
> tax.
>
> Then years later I wanted to test something in IE and found the rescue
> disks that came with an old laptop. So I restored it to its original
> Windows XP state that I had never before used, found it had IE6 on it,
> and tried to put IE8 on. It was then I found I needed all these service
> packs and autoupdaters.

That probably explains the difference between your experience and
mine (and others) - installing XP SP3, and having no problems with
getting IE 8 up and running.

Jonathan N. Little

unread,
Apr 20, 2012, 9:08:17 AM4/20/12
to
Ben C wrote:
> Then years later I wanted to test something in IE and found the rescue
> disks that came with an old laptop. So I restored it to its original
> Windows XP state that I had never before used, found it had IE6 on it,
> and tried to put IE8 on. It was then I found I needed all these service
> packs and autoupdaters.

Because IE is not a web browser but a OS component that provides web
browsing...

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com

Barry Gold

unread,
Apr 23, 2012, 11:17:09 AM4/23/12
to
On 4/12/2012 1:20 AM, Swifty wrote:
> I have defined a class, "sunset" as:
>
> .sunset {color:red}
>
> Can I add things like:
>
> a:link {color:#611}

That should work, if I understand the priority rules for CSS correctly.
The priority for ".sunset" is 010(*). The priority for "a:link" is
011, so it should override ".sunset".

Now... if you wanted color:#611 to apply to links inside a "sunset" span
but not to other links, you would make it

.sunset a:link {color:#611;}


(*) In a sufficiently large base, e.g., if your most complex selection
rule has 12 parts, use base 13.

Swifty

unread,
Apr 23, 2012, 12:23:18 PM4/23/12
to
On Mon, 23 Apr 2012 08:17:09 -0700, Barry Gold <Barry...@ca.rr.com>
wrote:

>Now... if you wanted color:#611 to apply to links inside a "sunset" span
>but not to other links, you would make it
>
>.sunset a:link {color:#611;}

That's what I was after, and that's more or less what I did (on the
recommendations I received here). Any haziness is because of the long
time (by my memory's standards) since I did this - about 7 days.

Jukka K. Korpela

unread,
Apr 23, 2012, 1:44:04 PM4/23/12
to
2012-04-23 18:17, Barry Gold wrote:

> On 4/12/2012 1:20 AM, Swifty wrote:

And the problems were solved; didn't you read the answers before posting
yours?

>> I have defined a class, "sunset" as:
>>
>> .sunset {color:red}
>>
>> Can I add things like:
>>
>> a:link {color:#611}
>
> That should work, if I understand the priority rules for CSS correctly.

This has nothing to do with priority rules, in the context that is
all-important but was left out by you:
"... into the "sunset" class, such that all links inside a <SPAN
CLASS=sunset> inherit the #611 colour?"

> The priority for ".sunset" is 010(*). The priority for "a:link" is 011,
> so it should override ".sunset".

The selector ".sunset", when set on a <span> element only, never matches
any <a> element, so priority does not matter.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
0 new messages