[css-d] changing/alternating button text

2006-03-07 Thread [EMAIL PROTECTED]
is there a css way to make buttons/links that change text on hover?  say 
you have a button which would be too wide if you place the entire text 
on it, so on hover you want alternate text to display.  example:

Contact Us -- normal state
Our Location -- hover state

__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/


Re: [css-d] changing/alternating button text

2006-03-07 Thread [EMAIL PROTECTED]
This was it! - neither title nor acronym would fit this situation.  
Somewhere buried deeply within my notes I have another solution, but 
this works well - thx, Bob

Mike Dougherty wrote:

 Are you opposed to using the title attribute?
 a title='this text pops up on hover in most browsers' 
 href='foo.htm'Contact/a

 directly changing the text is a behavior fit for javascript

 however, CSS would let you do this:

 a href='foo.htm'
   span class='short'Contact/span
   span class='long'Our more descriptive location text/span
 /a

 a span.long { display: none; } /* normally don't display the long text */
 a:hover span.short { display: none; } /* when hovering, hide the short 
 text */
 a:hover span.long { display: inline; } /* when hovering, show the long 
 text */

 if you go this route, consider keyboard navigation doesn't invoke the 
 :hover pseudo element.
 (also IE only allows :hover on a tags)




__
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/