Re: [css-d] span:link and span:visited
On Tue, Nov 30, 2010 at 4:00 PM, Michael McGinnis mcsty...@biographiks.com wrote: Using Javascript, clicking on a span either shows or hides a div. But I want to make the span disappear after I click on it. I see that I can style span:hover and span:active, but not span:visited, since it's not actually a link. But is there a counterpart or workaround? Or would this be done using Javascript rather than CSS? __ I would recommend doing this in the javascript. You should have a pointer to the element handy when processing the click. So it should be easy to set the display for the object which generated the click to none. I believe this will be the proper place to put this feature. If for no other reason it gives you a simple means to set a variable in your javascript to either disappear the span or not. I like to keep my javascript functionality in the javascript. This helps when a user does not have javascript enabled (or is using NoScript addon). Regards, Claude Needham __ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] span:link and span:visited
On 11/30/10 7:00 PM, Michael McGinnis wrote: Using Javascript, clicking on a span either shows or hides a div. But I want to make the span disappear after I click on it. I see that I can style span:hover and span:active, but not span:visited, since it's not actually a link. But is there a counterpart or workaround? Or would this be done using Javascript rather than CSS? Interesting reading... http://dbaron.org/mozilla/visited-privacy Best, ~d -- :: desktop and mobile :: http://chelseacreekstudio.com/ __ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
[css-d] span:link and span:visited
Using Javascript, clicking on a span either shows or hides a div. But I want to make the span disappear after I click on it. I see that I can style span:hover and span:active, but not span:visited, since it's not actually a link. But is there a counterpart or workaround? Or would this be done using Javascript rather than CSS? __ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Re: [css-d] span:link and span:visited
On 11/30/10 4:00 PM, Michael McGinnis wrote: Using Javascript, clicking on a span either shows or hides a div. But I want to make the span disappear after I click on it. I see that I can style span:hover and span:active, but not span:visited, since it's not actually a link. But is there a counterpart or workaround? Or would this be done using Javascript rather than CSS? That's hard to answer without seeing some code and a better idea of what you are trying to do. But CSS does give you a number of options for showing and hiding content. You can shift stuff that's inside an element with overflow: hidden; on it, for example. Look into the :target pseudo-element as well--available on most browsers, and also in IE 6-8 with Dean Edwards's ie9.js - http://ie7-js.googlecode.com/svn/test/index.html Cordially, David -- __ css-discuss [cs...@lists.css-discuss.org] http://www.css-discuss.org/mailman/listinfo/css-d List wiki/FAQ -- http://css-discuss.incutio.com/ List policies -- http://css-discuss.org/policies.html Supported by evolt.org -- http://www.evolt.org/help_support_evolt/