Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts

    Question removing CSS attributes

    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?
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #2
    Senior Coder
    Join Date
    Jul 2004
    Location
    New Zealand
    Posts
    1,315
    Thanks
    0
    Thanked 2 Times in 2 Posts

  • #3
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    tx... I could swear that thare was no "none" value... I should have look for more attentively
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    The Netherlands, Baarn, Ut.
    Posts
    4,252
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Rollover, hover

    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...
    Regards,
    Ronald.
    ronaldvanderwijden.com

  • #5
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    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... )

    Tx.
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •