Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Change background colour with hovering mouse  (Read 3821 times)

0 Members and 1 Guest are viewing this topic.

JKincaid

  • Guest
Change background colour with hovering mouse
« on: July 24, 2006, 05:13:22 AM »
Sorry if the title makes no sense but I am not sure how to put this in few words.

Basically what I am trying to find out is the HTML code to allow the background colour of a box change (or highlight) when the mouse is moved over it. Similar to what happens on some forums when you hover over a category.

JK

Rob Pomeroy



    Prodigy

  • Systems Architect
  • Thanked: 124
    • Me
  • Experience: Expert
  • OS: Other
Re: Change background colour with hovering mouse
« Reply #1 on: July 24, 2006, 05:45:28 AM »
HTML links will usually change colour/style when you hover over them.  Here are a couple of useful links/tutorials concerning using CSS to do this: >1< >2<.

Note that the CSS :hover psuedoclass is not supported by all browsers for all elements.  Styling hyperlinks usually works, but styling other HTML elements may not.

The other way would be using javascript and the "onMouseOver"/"onMouseOut" events.  A bit more complicated than the CSS method, but that's how it used to be done before CSS really took off, and is still often used for rollover image effects (buttons that change when you hover over them, etc).
« Last Edit: July 24, 2006, 05:46:09 AM by robpomeroy »
Only able to visit the forums sporadically, sorry.

Geek & Dummy - honest news, reviews and howtos

JKincaid

  • Guest
Re: Change background colour with hovering mouse
« Reply #2 on: July 24, 2006, 10:35:09 AM »
Thanks, I am using frontpage for the most part and I am not sure I can use CSS in the HTML coding.

Rob Pomeroy



    Prodigy

  • Systems Architect
  • Thanked: 124
    • Me
  • Experience: Expert
  • OS: Other
Re: Change background colour with hovering mouse
« Reply #3 on: July 24, 2006, 10:46:32 AM »
You should be able to...  But in any case if you hang around here long enough you'll quickly pick up how much I hate FrontPage.  :)  I recommend the free program NVu, which you'll find if you follow the link in my signature to the software FAQ.
Only able to visit the forums sporadically, sorry.

Geek & Dummy - honest news, reviews and howtos

Zylstra

  • Moderator


  • Hacker

  • The Techinator!
  • Thanked: 45
    • Yes
    • Technology News and Information
  • Certifications: List
  • Computer: Specs
  • Experience: Guru
  • OS: Windows 7
Re: Change background colour with hovering mouse
« Reply #4 on: July 24, 2006, 03:11:07 PM »
Why is this post a sticky?

soybean



    Genius
  • The first soybean ever to learn the computer.
  • Thanked: 469
  • Computer: Specs
  • Experience: Experienced
  • OS: Windows 10
Re: Change background colour with hovering mouse
« Reply #5 on: July 24, 2006, 07:54:29 PM »
Quote
Thanks, I am using frontpage for the most part and I am not sure I can use CSS in the HTML coding.
You can use CSS with FrontPage.  Open FrontPage Help, select the Index tab, and enter CSS in the keywords box.

JKincaid

  • Guest
Re: Change background colour with hovering mouse
« Reply #6 on: July 25, 2006, 10:46:03 AM »
Quote
You should be able to...  But in any case if you hang around here long enough you'll quickly pick up how much I hate FrontPage.  :)  I recommend the free program NVu, which you'll find if you follow the link in my signature to the software FAQ.


Admittedly, this is all new to me, I am just learning but seeing what can be done I want to try everything. Just not all in one go.

Thanks for the advice Rob, I haven't had the chance to get into Frontpage fully so I haven't found the bad parts. Just out of curiosity, where do I find NVu amongst the list from that link.

Rob Pomeroy



    Prodigy

  • Systems Architect
  • Thanked: 124
    • Me
  • Experience: Expert
  • OS: Other
Re: Change background colour with hovering mouse
« Reply #7 on: July 26, 2006, 03:06:51 AM »
Bring up the software FAQ, then press Ctrl+F (find) and type NVu.  Your browser will find it on the page for you.
Only able to visit the forums sporadically, sorry.

Geek & Dummy - honest news, reviews and howtos