If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Senior Member
    Join Date
    Apr 2005
    Hatfield, England
    Member #
    I am trying to create an a:hover function so that all of my button will be selectable. I have half succeeded, i used a float to make the whole button selectable. So the background now changes as i want it to.

    The second part is making the text turn white when the mouse hovers over the button. Currently it only works when the mouse hovers over the text.

    I have been trying to pad it, the green shows what part is affected by hover.

    What should happen is the text should turn white and the background should turn dark blue.

    This is my first attempt to use CSS so i appoligise if the code is a bit messy.

    div#links {position:absolute; left:0px; top:70px; width:140px;
    			padding:0; margin:0px 0 15px 0;}			
    div#links ul {border:0; margin:12px 1.25em 12px 1.25em; padding:0px; list-style-type:none; font-weight:bold; font-size:.75em; 					 				background-color:#336699;}
    div#links li {border-bottom:1px solid; margin:0; padding:.3em 0; text-indent:.5em}
    div#links li:first-child {border-top:1px solid;}
    div#links a {text-decoration:none; color:black; padding:3px 20px; background-color:#00CC00}
    div#links a:hover {color:white;}
    div#links li:hover {background-color:#000066;}
    * html div#links ul {float:left; border-top:1px solid black;}


  3. #2
    Senior Member GeZe's Avatar
    Join Date
    Dec 2003
    Member #
    if you put display:block on the link element then you are allowed to add hieght, width, etc. to it.

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
All times are GMT -6. The time now is 01:46 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: