hover

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • domeceo

    hover


    I'm new to CSS. I have seen hover used with anchor elements to chang
    the text color but can it be used with any other elements? Are ther
    any other simple alternate methods of changing text color without th
    use of images (like with onMouseover/onMouseout)

    domece
    -----------------------------------------------------------------------
    Posted via http://www.forum4designers.co
    -----------------------------------------------------------------------
    View this thread: http://www.forum4designers.com/message46697.htm

  • David Dorward

    #2
    Re: hover

    domeceo wrote:[color=blue]
    > I'm new to CSS. I have seen hover used with anchor elements to change
    > the text color but can it be used with any other elements?[/color]

    Yes, but it doesn't work in IE.
    [color=blue]
    > Are there any other simple alternate methods of changing text color
    > without the use of images (like with onMouseover/onMouseout)?[/color]

    You can access CSS properties via objRef.style.pr opertyName (converting
    two-part properties to camelCase), or change the class wtih
    objRef.classNam e.
    [color=blue]
    > Posted via http://www.forum4designers.com[/color]

    - Ugly and large sig
    - non-standard sig seperator
    - adverts on the pages

    Try either a less evil Web-Usenet gateway: http://groups.google.com/
    Or get a real NNTP account.

    --
    David Dorward <http://dorward.me.uk/>

    Comment

    • fenian

      #3
      Re: hover

      Maybe stick it in a table, and give the table cell an id, and then have
      a mouseover on the table cell change the bgcolor. Example follows. Question
      to throw out there - is getElementById( ) an IE only thing? I have to admit,
      I'm pretty green with the Javascript, and have only had call to write for IE
      so far, and so haven't concerned myself too much with cross browser stuff.

      <script>

      function chBgcolor() {
      document.getEle mentById("link1 ").bgColor = "FFFFFF";
      return true;
      }

      </script>
      [html]
      <tr>
      <td id="link1" onmouseover="ch Bgcolor();"><a href="link">lin k
      text</a></td>
      </tr>


      "domeceo" <domeceo.11sf8p @mail.forum4des igners.com> wrote in message
      news:domeceo.11 sf8p@mail.forum 4designers.com. ..[color=blue]
      >
      > I'm new to CSS. I have seen hover used with anchor elements to change
      > the text color but can it be used with any other elements? Are there
      > any other simple alternate methods of changing text color without the
      > use of images (like with onMouseover/onMouseout)?
      >
      >
      > domeceo
      > ------------------------------------------------------------------------
      > Posted via http://www.forum4desig ners.com
      > ------------------------------------------------------------------------
      > View this thread: http://www.forum4desig ners.com/message46697.ht ml
      >[/color]


      Comment

      • Steve Pugh

        #4
        Re: hover

        "fenian" <fenian@start.c a> wrote:[color=blue]
        >"domeceo" <domeceo.11sf8p @mail.forum4des igners.com> wrote in message
        >news:domeceo.1 1sf8p@mail.foru m4designers.com ...[color=green]
        >>
        >> I'm new to CSS. I have seen hover used with anchor elements to change
        >> the text color but can it be used with any other elements? Are there
        >> any other simple alternate methods of changing text color without the
        >> use of images (like with onMouseover/onMouseout)?[/color][/color]

        Top posting fixed, please don't.
        [color=blue]
        > Maybe stick it in a table, and give the table cell an id, and then have
        >a mouseover on the table cell change the bgcolor.[/color]

        Why does it need to be in a table?

        Using .style.backgrou ndColor rather than .bgcolor it will work for any
        element.
        [color=blue]
        >Question
        >to throw out there - is getElementById( ) an IE only thing?[/color]

        No. It's part of the W3C DOM and is supported by IE5+, Gecko, Opera
        and others. The IE only 'equivalent' is document.all

        Steve

        --
        "My theories appal you, my heresies outrage you,
        I never answer letters and you don't like my tie." - The Doctor

        Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

        Comment

        • Andrés Sedano

          #5
          Re: hover



          Try this...

          Steve Pugh wrote:[color=blue]
          > "fenian" <fenian@start.c a> wrote:
          >[color=green]
          >>"domeceo" <domeceo.11sf8p @mail.forum4des igners.com> wrote in message
          >>news:domeceo. 11sf8p@mail.for um4designers.co m...
          >>[color=darkred]
          >>>I'm new to CSS. I have seen hover used with anchor elements to change
          >>>the text color but can it be used with any other elements? Are there
          >>>any other simple alternate methods of changing text color without the
          >>>use of images (like with onMouseover/onMouseout)?[/color][/color]
          >
          >
          > Top posting fixed, please don't.
          >
          >[color=green]
          >> Maybe stick it in a table, and give the table cell an id, and then have
          >>a mouseover on the table cell change the bgcolor.[/color]
          >
          >
          > Why does it need to be in a table?
          >
          > Using .style.backgrou ndColor rather than .bgcolor it will work for any
          > element.
          >
          >[color=green]
          >>Question
          >>to throw out there - is getElementById( ) an IE only thing?[/color]
          >
          >
          > No. It's part of the W3C DOM and is supported by IE5+, Gecko, Opera
          > and others. The IE only 'equivalent' is document.all
          >
          > Steve
          >[/color]

          Comment

          Working...