...

View Full Version : removing CSS attributes



Kor
10-14-2004, 10:02 AM
Probably it is not a pure CSS problem (rather a DHTML one) but here it might be e proper start.

A particular problem was to switch (on-the-fly) between a certain background-image and no image as a background. I wonder if there is a sort of "none" or "auto" value for a background-image for a possible "rollover" on-the-fly between an image and no image as a background-image.

And, as a general solution... Is there a possibility to find a similar way for all the CSS attributes?

I could switch the classes, yea... But is this the only way?

hemebond
10-14-2004, 10:13 AM
http://www.w3.org/TR/CSS21/colors.html#propdef-background-image

Kor
10-14-2004, 10:58 AM
tx... I could swear that thare was no "none" value... I should have look for more attentively

ronaldb66
10-14-2004, 12:45 PM
I don't know if you're familiar with the CSS :hover pseudo-class, but switching between one BG image and another on hover is the same as switching between "background-image: none;" and "background-image: url(yadiyada.gif);" (or the other way around, of course.

In fact, it's exactly like switching from one class to another, only the browser does the switching for you... :D

Kor
10-14-2004, 01:37 PM
Yes, I know pseudo classes, thank you for pointed me this. In fact I am to use onclick as event, to let user remove the bgimage on will (if he don't wanna or if he wants to print the content). I could easily change the classes on-the-fly, but I would have rather like to change the styles, in fact a single attribute, to avoid the increasing of space ocupied by extra classes .

(for "aestethic" resons, let's say... :D )

Tx.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum