Yazmin Media wrote:

> Is there a way to hide/show text by clicking a link that can be done solely
> with CSS? Or is this something in the DHTML realm and if so, what would I
> google to get more information?

You can show/hide text (and images etc) on _hover_ with pure CSS. If you 
want a click, and text that stays on page after the mouse is gone, you'd 
either need a regular link (and a slightly modified version of the page) 
or some javascript.

I wonder, though, if it could be possible to make links with unused 
variables and define display:none; for a:link and display:block for 
a:visited. Something like this:

#tester a:link div {
        display: none;
}
#tester a:visited div {
        display: block;
}

<p id="tester"><a href="
?id=1">test
<div>testtekst</div></a>
</p>

That should make the text appear on click, but you cannot make it 
disappear afterwards. Works in my hasty test-set-up in mozilla, not in 
Explorer though, perhaps theres a remedy for that (anybody?)

For the javascript, begin on <http://24ways.org/> - the 24th, the 12th 
and perhaps the 18th. By then, you'll have a good idea of what to search 
for if you need more.

I have an example with javascript implemented on 
<http://phonixfolk.dk/downloads_e.php> if that's usefull. This 
javascript is based on valid code, and nicely degradeable javascript for 
the occasions where javascript isn't available. It's here too, in a 
simple, _Danish_ version :) <http://garion.dk/webdesign/faq-udfold.html>

Best regards

Jesper Brunholm
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
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/

Reply via email to