Overlaying text on a graphic.

M

Mr.Magic

For a website I did for work, they had a graphic they wanted for the buttons
with text on them. The problem was that every different button needed to be
created with the text on it. Is there a way to load a graphic and then put
text on top of it through .Net/CSS/However so I can use a blank button and
then write the text on it so I don't have to keep going back to our graphic
designers?

TIA - Jeff.
 
G

Gregory A. Beamer

For a website I did for work, they had a graphic they wanted for the
buttons with text on them. The problem was that every different button
needed to be created with the text on it. Is there a way to load a
graphic and then put text on top of it through .Net/CSS/However so I
can use a blank button and then write the text on it so I don't have
to keep going back to our graphic designers?

Within .NET, you can use GDI+ to create a JPG or GIF graphic. It can be
done "on the fly", if you would like. Personally, I would opt for a third
party graphics lib instead, because the GDI+ stuff tends to look a bit ugly
with web graphics. NOTE: Have not tested since 1.x, so the rules may have
changed. ;-)

Peace and Grace,

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
B

bruce barker

trival, just use an asp:button, specify text and set the
background-image with css.

-- bruce (sqlwork.com)
 
A

Andrew Morton

Mr.Magic said:
For a website I did for work, they had a graphic they wanted for the
buttons with text on them. The problem was that every different
button needed to be created with the text on it. Is there a way to
load a graphic and then put text on top of it through
.Net/CSS/However so I can use a blank button and then write the text
on it so I don't have to keep going back to our graphic designers?

You could set the background-image of a <div> you create for the button.

Andrew
 

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

Top