Results 1 to 2 of 2

Thread: Buttons

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

    Wink Buttons

    I'm in the process of making a blog and i would like a button that says blog on it and looks 3d not the type you can make by using form and button. Is this more grphics than html and if so can anyone point to a source code. Thanks a lot!!

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Being as you've posted this in the HTML forum, I'll presume you've already got the graphics you want (normal, pressed and mouseover [optional]). In this case, you need to preload the images:
    Code:
    <script type="text/javascript">
      (new Image()).src = "blogButton_normal.png";
      (new Image()).src = "blogButton_mouseover.png";
      (new Image()).src = "blogButton_pressed.png";
    </script>
    Then, create the button like so:
    Code:
    <img
      src="blogButton_normal.png"
      onmouseover="this.src = 'blogButton_mouseover.png';"
      onmouseout="this.src = 'blogButton_normal.png';"
      onmousedown="this.src = 'blogButton_pressed.png';"
      onmouseup="this.src = 'blogButton_normal.png';"
    >
    Remove the mouseover and mouseout events if you don't want to use a hover effect.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

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
  •