Forum Moderators: not2easy

Message Too Old, No Replies

Images in buttons

         

Paffendorf

1:41 pm on Aug 11, 2006 (gmt 0)

10+ Year Member



Im new here and dont know really to post this thread. But here is my issue.

I know you can assign colors to borders for form buttons. But I would like to assign images instead. I know how to use background-image to add an image to a button, but is there a way to assign an image to the left and right side of a button and then use a center image as a fill in?

Or is there a way to have a full image resize itself depending on the width of the button?

Ive tried everything I could think of. Any help would be appreciated.

Paff

Fotiman

1:57 pm on Aug 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



From the HMTL spec [w3.org]:

Buttons created with the BUTTON element function just like buttons created with the INPUT element, but they offer richer rendering possibilities: the BUTTON element may have content. For example, a BUTTON element that contains an image functions like and may resemble an INPUT element whose type is set to "image", but the BUTTON element type allows content.

So you could do something like this:
<button name="submit" value="submit" type="submit">
Send<IMG src="/icons/wow.gif" alt="wow"></button>

Or, I imagine, some method of including both your side and center images within the content of the button element.

Hope that helps.