Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

want to add an image to a html type input button

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Valli - 26 Sep 2007 09:18 GMT
Hi,

I want to add an image to a html type input button. How can I do this?
I have used background image style . But its not working.

My target is to show an image in the button
can anyone help me?

Signature

Regards
Valli

Chris Fulstow - 26 Sep 2007 10:30 GMT
> Hi,
>
[quoted text clipped - 7 lines]
> Regards
> Valli

Hi Valli

You're on the right track, you also need to set the background color
to transparent:
background-color: transparent;

Or you can do it all in one go:
background: transparent url(ButtonImage.gif) no-repeat center top;

Chris
Valli - 26 Sep 2007 11:25 GMT
Hi,

   Thanks for your help. Using background color style, the image is getting
displayed in button now.
I am using this button in a html table cell. When user clicks on this
button, i will get the rowindex of the selected row.
If I use this style, the rowindex is not resulting properly.

Do you have any ideas on this?

Signature

Regards
Valli

>> Hi,
>>
[quoted text clipped - 18 lines]
>
> Chris
Alexey Smirnov - 26 Sep 2007 10:37 GMT
> Hi,
>
[quoted text clipped - 7 lines]
> Regards
> Valli

<input type="button" value="Button"
style="background-image: url('http://msdn2.microsoft.com/msdn/controls/
toolbar/en-us/StarWhite.gif');">

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.