mike: set background-color to NONE

Hi,

in my CSS I defined a background-color for A:HOVER. This works pretty nicely. Now I have one section on my site, where I don't want to have this hover effect. I can override the background-color, but just with another color. I cannot reset it to nothing...

What I was trying to do was like this: { background-color: none; } which is not working. I can put every color there and it is working. But I want to put NO color. How to do this? Is there a special command or keyword?

Thanks,
Mike

  1. Hi!

    Try background-color:transparent;.

    Greetings from Iserlohn

    Martin

    1. Hallo Martin, hi Mike!

      Try background-color:transparent;.

      How is this one?

        
      <body style="[code lang=css]background-color:#ff0000
      ~~~">  
      <a href="#" style="`color:black`{:.language-css}" onmouseover="`document.body.style.backgroundColor=''`{:.language-javascript}">don't touch me, else I will set backgroundcolor to bladhiblahdiblah!</a>  
      </body>[/code]  
        
      Regards, Gernot
      
      1. Hi,

        How is this one?

        Stupid.
        Why use javascript to set CSS properties if CSS alone can do the job?

        cu,
        Andreas

        --
        Warum nennt sich Andreas hier MudGuard?
        Schreinerei Waechter
        Fachfragen per E-Mail halte ich für unverschämt und werde entsprechende E-Mails nicht beantworten. Für Fachfragen ist das Forum da.
        1. Hallo MudGuard,

          Stupid.
          Why use javascript to set CSS properties if CSS alone can do the job?

          Not stupid at all, because CSS alone can't do the job as described!

          As far as I understood Mike, he wanted to exempt a section of an ancestor element from the hover effect. Anyway that will only work for the ancestor element as a whole and not just for the section and it will only work with javascript since there are no ancestor selectors in CSS!

          Gruß Gernot

          1. Hi,

            As far as I understood Mike, he wanted to exempt a section of an ancestor element from the hover effect.

            Where do you read anything about ancestor elements (or problems with selecting the elements)?

            Mike's problem was that he tried (in vain) to use the non-existing value 'none' instead of the existing value 'transparent'.

            cu,
            Andreas

            --
            Warum nennt sich Andreas hier MudGuard?
            Schreinerei Waechter
            Fachfragen per E-Mail halte ich für unverschämt und werde entsprechende E-Mails nicht beantworten. Für Fachfragen ist das Forum da.