link buttons

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • html on wheels
    New Member
    • Feb 2007
    • 35

    link buttons

    I figured out how to do rollovers with javascript today: Original button color --> roll the mouse over it --> different color. The problem is that the graphical buttons come within a rectangle of white space. This contrasts horribly with my khaki background. Any ideas on ways to fix this?

    Also most of the free-button websites I have seen have really "fancy" buttons and I just want simple ones to work with. Any ideas of a good source?
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    What code do you have? Do you simply want nice images or do you want to style the buttons using CSS and on hover change the style?

    Comment

    • html on wheels
      New Member
      • Feb 2007
      • 35

      #3
      <a href="mailto:my email@hotmail.c om."
      onMouseOver="do cument.image1.s rc='button.gif' "
      onMouseOut="doc ument.image1.sr c='button_2f'">
      <img src="button.gif " name="image1">
      </a>


      The buttons are contained in a square of white background.

      Comment

      • acoder
        Recognized Expert MVP
        • Nov 2006
        • 16032

        #4
        Originally posted by html on wheels
        <a href="mailto:my email@hotmail.c om."
        onMouseOver="do cument.image1.s rc='button.gif' "
        onMouseOut="doc ument.image1.sr c='button_2f'">
        <img src="button.gif " name="image1">
        </a>


        The buttons are contained in a square of white background.
        onmouseover should contain the second image (button_2f) for the rolloevr to work properly. Also, shouldn't button_2f have an extension.

        As regards to your image problem, one possibility is to create transparent images using an image editor, e.g. cut the button image (everything besides the white) and create a new image with a transparent background.

        Comment

        Working...