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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS 'menu' with hover color change

    Hi,

    I'm trying to for a CSS 'menu' script that when a table cell is hovered the cell background color changes.

    Here are 2 good examples of what I'd like, in action (note: this doesn't reflect my personal music taste!):

    http://www.bonjovi.com/whataboutnow
    (It is highly preferred to have 'cells' that contain logos, such as amazon, iTunes, etc.)

    http://twentytwenty.justintimberlake.com/
    (click buy now at top of page - I'd prefer the code to not be 'pop-up' - instead more like the Bon Jovi page.)


    Just need a little push in the right direction - don't need all buttons written out! I can infer from an example table and plug in my own variables.

    Thanks in advance - greatly appreciated!!

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,316
    Thanks
    23
    Thanked 613 Times in 612 Posts
    Use the :hover in your css file:
    a:hover{background-colorink;}

    or instead of 'a' it could be li, whatever is your menu cell

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,675
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello white.lotus,
    If you just want a color change on the background, look at this example.
    If you want to use images, this is a good way to do it.

    Lots of menu examples on that site - http://nopeople.com/CSS%20tips/index.html
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Tags for this Thread

    Posting Permissions

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