Connecting Tech Pros Worldwide Forums | Help | Site Map

Re: Hover over text (no link) changes background color not in IE?

Jukka K. Korpela
Guest
 
Posts: n/a
#1: Aug 30 '08
Moon wrote:
Quote:
I'm slowly getting back into webdesign and I'm not sure I'm doing it
right.
You're not. You should read a good modern tutorial now, instead of guesswork
and trial and error, which mostly results in error.
Quote:
I have 2 sentences of spoiler text on my page which I've
coloured black, only when you move the mouse over it the color should
be switched to make the line readable.
That's a poor idea for several reasons. In particular, you are _relying_ on
the effects of CSS. See the CSS Caveats:
http://www.cs.tut.fi/~jkorpela/css-caveats.html
Quote:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
Just three questions:
1) Why Transitional, for an apparently new page?
2) Why not a correct doctype? The one you use triggers Quirks Mode in IE;
see
http://www.cs.tut.fi/~jkorpela/quirks-mode.html
3) Why no URL? Are you sure the snippet you posted contains all the relevant
information? Well, it doesn't.
Quote:
#spoiler:hover {
background: #FFFFFF;
}
>
Works fine in FF2 and Opera 9, how do I make it work in IE? TIA!
You're not telling what kind of an element has id="spoiler", but the crystal
ball tells that it is not a link element and that you are using IE 6 or
older, which doesn't support :hover except for links.

Yucca


Jukka K. Korpela
Guest
 
Posts: n/a
#2: Aug 31 '08

re: Re: Hover over text (no link) changes background color not in IE?


Moon wrote:
Quote:
Jukka K. Korpela schrieb:
>
Quote:
>Just three questions:
>1) Why Transitional, for an apparently new page?
>
Cause I'm not up to current stuff obviously and I thought to put the
browsers in a more less strict mode.
You have a wrong idea of what Transitional is for, then. It is for _pages_
in transition or, to be honest, for _legacy_ pages.
Quote:
Quote:
>3) Why no URL?
>
Cause I've just started with nothing online yet?
You didn't get the point, apparently. So please read the group for a week or
two, or check back the Google archives, and you'll understand.
Quote:
Quote:
>You're not telling what kind of an element has id="spoiler", but the
>crystal ball tells that it is not a link element.
>
Actually the *subject* tells you that it's no link!
The subject might be wrong (people often tell things about their pages that
aren't true, and get confused, because they refuse to reveal the URL that
tells the true story - or, worse still, modify the demo page content after
posting its URL!). Moreover, the Subject line is supposed to stand on its
own, and so is the message body. It is bad practice to imply the heading in
the text, on Usenet and elsewhere.
Quote:
So here it is:
No it isn't. It's a snippet of code, not a URL.
Quote:
{
background: #000000;
color: #000000;
}
That's not even a complete CSS rule: it lacks the selector part.
Quote:
#spoiler:hover {
background: #FFFFFF;
}
<div id="spoiler">This is spoiler text only readable when mouse
hovers over it.</div>
And it's still a _bad_ approach, and it's probably still true, though not
confirmable in the absence of a URL and other data, that you are using IE 6,
which simply don't support that.

By the way, class="..." is preferable to id="..." in cases like this. There
is nothing in the concept of a spoiler that says that a page may contain
only one spoiler.

Ben C
Guest
 
Posts: n/a
#3: Aug 31 '08

re: Re: Hover over text (no link) changes background color not in IE?


On 2008-08-31, Jukka K. Korpela <jkorpela@cs.tut.fiwrote:
[...]
Quote:
By the way, class="..." is preferable to id="..." in cases like this. There
is nothing in the concept of a spoiler that says that a page may contain
only one spoiler.
Rather a strange criterion. Is there anything in the concept of anything
that says that a page may contain only one of it?
Jukka K. Korpela
Guest
 
Posts: n/a
#4: Aug 31 '08

re: Re: Hover over text (no link) changes background color not in IE?


Moon wrote:
Quote:
Jukka K. Korpela schrieb:
>
Quote:
>You didn't get the point, apparently. So please read the group for a
>week or two, or check back the Google archives, and you'll
>understand.
>
Right, I guess actually stating the point right now in your posting
would have taken the time you needed to go on ranting.
You still didn't post a URL.

Please don't bother posting anything before you have a clue.

Yucca
Jukka K. Korpela
Guest
 
Posts: n/a
#5: Aug 31 '08

re: Re: Hover over text (no link) changes background color not in IE?


Ben C wrote:
Quote:
On 2008-08-31, Jukka K. Korpela <jkorpela@cs.tut.fiwrote:
[...]
Quote:
>By the way, class="..." is preferable to id="..." in cases like
>this. There is nothing in the concept of a spoiler that says that a
>page may contain only one spoiler.
>
Rather a strange criterion. Is there anything in the concept of
anything that says that a page may contain only one of it?
That's the very idea of id="...": it is unique on a page. Why would you use
it for elements that may well get repeated in later versions? That would
just make changes more difficult.

A page footer, for example, may be regarded as essentially unique on a page.
This does not mean that you could not use class="..." for it, too. It just
means that id="..." is a logical and practical alternative.

Yuvva

Ben C
Guest
 
Posts: n/a
#6: Aug 31 '08

re: Re: Hover over text (no link) changes background color not in IE?


On 2008-08-31, Jukka K. Korpela <jkorpela@cs.tut.fiwrote:
Quote:
Ben C wrote:
>
Quote:
>On 2008-08-31, Jukka K. Korpela <jkorpela@cs.tut.fiwrote:
>[...]
Quote:
>>By the way, class="..." is preferable to id="..." in cases like
>>this. There is nothing in the concept of a spoiler that says that a
>>page may contain only one spoiler.
>>
>Rather a strange criterion. Is there anything in the concept of
>anything that says that a page may contain only one of it?
>
That's the very idea of id="...": it is unique on a page.
Of course, but for all we know only one "spoiler" per page is part of
the OP's design.
Quote:
Why would you use it for elements that may well get repeated in later
versions? That would just make changes more difficult.
Yes, although it's that difficult to convert id to class if you need to.
Quote:
A page footer, for example, may be regarded as essentially unique on a
page. This does not mean that you could not use class="..." for it,
too. It just means that id="..." is a logical and practical
alternative.
Using id is quite a good way to make clear that there is only one of
something, so for that reason it adds a bit of "documentation" to use it
for something like spoiler-- it suggests to a non-cynical person editing
the source to expect only one.
Chris F.A. Johnson
Guest
 
Posts: n/a
#7: Aug 31 '08

re: Re: Hover over text (no link) changes background color not in IE?


On 2008-08-31, Moon wrote:
Quote:
Jukka K. Korpela schrieb:
....
Quote:
Quote:
>Moreover, the Subject line is supposed to stand on its own, and so is the
>message body. It is bad practice to imply the heading in the text, on
>Usenet and elsewhere.
>
Your expertise on webdesign apparently doesn't extend to usenet and
elsewhere. I've seen a lot of complaints about meaningless subjects but a
complaint about a meaningful subject and a message body that is in
correspondence with it - that's a first. And also utter BS.
You must be new to usenet. It is a common complaint. Many
newsreaders do not have the subject obviously visible when reading
the message text, and if you want help, it is only common sense to
make your message as clear as possible.


--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Chris F.A. Johnson
Guest
 
Posts: n/a
#8: Sep 2 '08

re: Re: Hover over text (no link) changes background color not in IE?


On 2008-09-02, Moon wrote:
Quote:
Chris F.A. Johnson schrieb:
>
Quote:
> You must be new to usenet.
>
Right.
>
Quote:
> Many
> newsreaders do not have the subject obviously visible when reading
> the message text
>
None of those that I've used over the years work like this nor do I see why
anyone would use such limited software instead of getting a decent reader
like 40tude.
There are 3 immediate strikes against 40tude:

it is not open source
it will not run on my system
it costs money

You snipped an important point that I made: "[not including the
problem in the message itself] is a common complaint."

Much of the so-called "limited" software has more features than
expensive junk like 40tude. And I would expect the same complaint
even from users of 40tude.

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
John Hosking
Guest
 
Posts: n/a
#9: Sep 2 '08

re: Re: Hover over text (no link) changes background color not in IE?


Chris F.A. Johnson wrote:
Quote:
>
There are 3 immediate strikes against 40tude:
>
it is not open source
So? *
Quote:
it will not run on my system
So this would be a killer reason not to use it, alright. **
Quote:
it costs money
Freeware to private users, educational users, and non-profit groups;
shareware for commercial users (60-day free trial)


* More interesting is that it's not being actively developed or supported.
** It runs on Windows, Chris. You could upgrade. ;-)

--
John
The possessive pronoun "its" has no apostrophe. Even on the Internet.
Chris F.A. Johnson
Guest
 
Posts: n/a
#10: Sep 2 '08

re: Re: Hover over text (no link) changes background color not in IE?


On 2008-09-02, John Hosking wrote:
Quote:
** It runs on Windows, Chris. You could upgrade. ;-)
Windows would be an expensive and extreme downgrade.

--
Chris F.A. Johnson <http://cfaj.freeshell.org>
================================================== =================
Author:
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
Blinky the Shark
Guest
 
Posts: n/a
#11: Sep 2 '08

re: Re: Hover over text (no link) changes background color not in IE?


Chris F.A. Johnson wrote:
Quote:
There are 3 immediate strikes against 40tude:
<snip>
Quote:
it costs money
Except for it being free.

--
Blinky
Killing all posts from Google Groups
The Usenet Improvement Project: http://improve-usenet.org
Need a new news feed? http://blinkynet.net/comp/newfeed.html

Michael Wojcik
Guest
 
Posts: n/a
#12: Sep 5 '08

re: Re: Hover over text (no link) changes background color not in IE?


Moon wrote:
Quote:
Chris F.A. Johnson schrieb:
>
Quote:
> There are 3 immediate strikes against 40tude:
>>
> it is not open source
>
So? Other than Truecrypt I don't see the need to insist on Open Source for
the sake of it.
There are many possible reasons for preferring (Chris did not
"insist", in the quoted text) open source. It's tremendously
presumptuous to claim that he prefers it only "for the sake of it" - a
presumption that suggests you have no real argument to make.

I've fixed dozens of bugs in open source software as I've encountered
them. That alone is a significant advantage of open source.
Quote:
Quote:
> it costs money
>
Free for private users like me.
I use my newsreader for both private and commercial purposes; perhaps
Chris does too. Not all users have the same requirements you do.
Quote:
Easy as that, dunno why some ppl think they have to ignore the obvious.
And I don't know why some people can't be bothered to type the vowels
in "people". One of life's little mysteries, I suppose.

--
Michael Wojcik
Micro Focus
Rhetoric & Writing, Michigan State University
Closed Thread