Results 1 to 3 of 3

Thread: CSS mouseover button

  1. #1
    Join Date
    Sep 2006
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default CSS mouseover button

    1) CODE TITLE: Mouseover Button with pur CSS in one line

    2) AUTHOR NAME/NOTES: Martin Hildenbrand, qipcom

    3) DESCRIPTION: Moueover button with CSS in one line.

    4) URL TO CODE: www.qipnet.de

    <div style="width: 100px; height: 100px;text-align: center; background-image: url('yourImageOFF.gif');" onMouseOver="style.background='url(yourImageON.gif)'" onMouseOut="style.background='url(yourImageOFF.gif)'" onClick="self.location='http://www.dynamicdrive.com">&nbsp;</div>


    Thats all !

  2. #2
    Join Date
    Aug 2005
    Posts
    971
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    This is not CSS, it's DHTML.

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,475
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    That is DHTML, not pure css. The mouse events require javascript enabled. Purely css would go something like so:

    Code:
    .roll {
    display:block;
    height:25px; /* use the images' dimensions */
    width:75px;
    background-image:url('off.gif');
    }
    .roll:hover {
    background-image:url('on.gif);
    }
    HTML Code:
    <a class="roll" href="wherever.htm">Link Text</a>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

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