Results 1 to 2 of 2

Thread: button hover image not using href

  1. #1
    Join Date
    Mar 2003

    button hover image not using href

    this works
    < a href="#" class="mybutton">press</a>
    and having a stylesheet defined with A.button:hover to change the bacjground image when hovering etc.
    A.button:hover {
    font-weight: bold;
    font-size: 9px;
    font-family: 'Lucida Grande' Geneva, Verdana, Arial, Helvetica, sans-serif;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    margin-left: 0px;
    padding-top: 3px;
    padding-right: 3px;
    padding-bottom: 3px;
    padding-left: 3px;
    background-position: middle;
    background-repeat: no-repeat;
    background-color: #edf3fe;
    text-decoration: none;
    color: red;
    background-position: center;
    border-width: 0px;
    background-color: #edf3fe;
    text-align: center;
    text-transform: uppercase;

    can i have the same functionality with form buttons and CSS.
    What i mean is i have a button defined within form elements and i want the hoover style defined in my stylesheet
    (* i know i can do it with preloaded images if i need to *)
    Thanks jitse

  2. #2
    Join Date
    Feb 2003
    Michigan, USA
    In browsers released after year 2000, you may be able to give the form buttons the :hover psuedo state. Internet explorer (all versions) can only apply the :hover psuedo state to the link tag, so this method won't work in Internet Explorer (90% of the users).

    You may be able to use JavaScript for this. If you want to go the JavaScript route, post this question in the JavaScript forum.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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