Combining a graphic with text on a button

  • Thread starter Thread starter Rod
  • Start date Start date
R

Rod

Hi,

Does anyone know of a way to combine an icon with text on a pushbutton
without venturing too deeply into the murky world of the graphics library.

The icon is a gif loaded from a file but the text is read from a resource
and may be in any one of several languages so I probably need to create the
button logo on the fly using text in a string.

Any suggestions on how I can combine the two?
 
You can achieve this by pure css:

input.MyButton{
background:url(icon.gif);
background-posision:left;
padding-left:20px;
}

That's it, you can play around with other css attributes to make your
button the way you want.

Ah, this approach works with links too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top