Previous Message
Next Message

[NEWBIE] Trying to make text switch content

Sent by Adam Kuehn on 4 January 2005 15:03


Dave wrote:
>    The much improved page is here:
>    http://www.theloop.jp/test.html
>
>    So now I am left with the switching of the text from English to 
>Japanese on moving the mouse over.
>    Is this actually possible with CSS?

As others have pointed out, depending on your document structure, 
this may be possible in pure CSS.  If the spans are classed siblings, 
then hovering the parent can toggle the display property of the 
sub-elements.  My purpose in writing, though, is to suggest that this 
may be more appropriately done using Javascript, or possibly not done 
at all.  Fundamentally, you are changing the *content* based on a 
user action (as, indeed, your subject line directly indicates).  This 
is the domain of Javascript, through and through.  It is what that 
language was designed for.  While this may be possible to do in pure 
CSS, it strikes me that this isn't really a matter of mere 
presentation and would best be done through Javascript where elements 
can be directly manipulated.  Moreover, Javascript is already 
required for the menus, so why not also use it for this purpose?

On the other hand, I am trying to envision why you'd want the other 
language to appear only on mouseover, and I can't think of a good use 
case.  If a user needs the Japanese version, then the menu is 
"mystery meat" - useless until the mouseover happens, and useless 
again when the mouse is removed.  On the other hand, if the user 
doesn't need the Japanese text, I don't see a great advantage in 
showing it when the mouse is over the text.  Worse, it may be 
disconcerting for a user who isn't all that fluent in Japanese to 
have the language toggle out from under them.  Unless this is a site 
designed to teach Japanese, I would at least consider always 
displaying both languages.

As an aside, I found the side "flyout" sub-sub-menu to be very 
difficult to navigate, especially if aiming for one of the lower 
sub-sub-items.  You might consider adding a timer or other device to 
make the horizontal transition easier for your users.

Good luck,

-- 

-Adam Kuehn
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread: