Loading ...
Sorry, an error occurred while loading the content.

Re: mouseovers

Expand Messages
  • Hugo Paulissen
    ... page, but ... Kerry, I simply use hover in css for this effect. Example CSS a {font-size: medium; color: red;} a:hover {color: #FFBA00;} Example HTML
    Message 1 of 4 , May 3, 2006
    • 0 Attachment
      >
      > <a href="acidophilus_plus.htm"><font size="3"
      > onmouseover="this.style.color='red'"
      > onmouseout="this.style.color='FFBA00'">Acidophilus Plus</font></a>
      >
      > As you can see, I am using this code for a link. It works on the
      page, but
      > the validator just doesn't like it. Thanks!
      >

      Kerry,

      I simply use hover in css for this effect.

      Example CSS
      a {font-size: medium; color: red;}
      a:hover {color: #FFBA00;}

      Example HTML
      <a href="acidophilus_plus.htm">Acidophilus Plus</a>

      Hugo
    • Marcelo de Castro Bastos
      On the last exciting episode, aired on 3/5/2006 01:50, Kerry Coates ... Hmm, Javascript is not my forte. It may be that this syntax is invalid -- the reference
      Message 2 of 4 , May 3, 2006
      • 0 Attachment
        On the last exciting episode, aired on 3/5/2006 01:50, Kerry Coates
        invited the wrath of the gods by saying:
        > I have some code on my page that the validator does not like. My page
        > otherwise validates. The code is this:
        >
        > <a href="acidophilus_plus.htm"><font size="3"
        > onmouseover="this.style.color='red'"
        > onmouseout="this.style.color='FFBA00'">Acidophilus Plus</font></a>
        >
        > As you can see, I am using this code for a link. It works on the page, but
        > the validator just doesn't like it. Thanks!
        >
        >
        Hmm, Javascript is not my forte. It may be that this syntax is invalid
        -- the reference I checked suggested you should call a function from
        inside the onmouseover and onmouseout events, instead of just putting in
        the statement. But you can do the same effect in CSS, and get rid of the
        <font> tag to boot:
        <html>
        <head>
        <title></title>
        <style>
        <!--
        a,a:visited {color:#FFBA00;
        font-size:larger;}
        a:hover,a:active {color:red;
        font-size:larger;}
        -->
        </head>
        <body>
        <p><a href="acidophilus_plus.htm>Acidophilus Plus</a></p>
        </body>
        </html>


        Marcelo
      • loro
        ... What validator this time? And what does it say? What doctype (if it s a real validator)? Meanwhile, the error probably goes away if you move the event
        Message 3 of 4 , May 3, 2006
        • 0 Attachment
          Kerry Coates wrote:
          >I have some code on my page that the validator does not like. My page
          >otherwise validates. The code is this:
          >
          ><a href="acidophilus_plus.htm"><font size="3"
          >onmouseover="this.style.color='red'"
          >onmouseout="this.style.color='FFBA00'">Acidophilus Plus</font></a>

          What validator this time? And what does it say? What doctype (if it's a
          real validator)?

          Meanwhile, the error probably goes away if you move the event handlers from
          the FONT tag to the A tag. You can see here which elements you can use
          onmouseover with.
          <http://www.w3.org/TR/html401/index/attributes.html>

          If you use a strict doctype the use of FONT will give you an error too
          (from a real validator).

          Lotta
        Your message has been successfully submitted and would be delivered to recipients shortly.