Overlaying text on a graphic.

  • Thread starter Thread starter Mr.Magic
  • Start date Start date
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.
 
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! |
*******************************************
 
trival, just use an asp:button, specify text and set the
background-image with css.

-- bruce (sqlwork.com)
 
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
 
Back
Top