0

I have an ASP button with text and I am wondering if there is a way to style just the text of the asp button in css? I want to style just the text with -webkit-mask-image.

<span class="submitSection">
    <input type="submit" name="ctl00$MainContent$LoginUser$LoginButton" value="Enter" id="MainContent_LoginUser_LoginButton" class="submitButton">
</span> 

I have tried:

.submitButton a
{

.submitButton Text
{

Is this even possible?

  • 1
    Can you provide the rendered HTML, rather then the ASP code? (You'll have a wider pool of answerers if you do.) – KatieK Jun 28 '13 at 16:04
  • http://stackoverflow.com/questions/12177630/how-to-set-css-style-to-asp-net-button may be the same question that has already been answered. This isn't classic ASP but rather ASP.Net from the looks of the IDs in the name. – JB King Jun 28 '13 at 16:07

1 Answers1

2

By "style the text" I am assuming that you mean the text within the button.

jsFiddle

.submitSection input {
    color: green;
}
Dan Grahn
  • 9,044
  • 4
  • 37
  • 74
  • this applies the style to the whole button, I need to style just the text within the button. –  Jun 28 '13 at 16:34
  • What specifically are you hoping to do with the text? – Dan Grahn Jun 28 '13 at 17:02
  • I am trying to apply a webkit mask image gradient over the text, and it works with normal text if I wrap the text itself in a span. But since the ASP button has the text hardcoded in the tag itself, I cant style just the text. –  Jun 28 '13 at 18:35
  • That is correct. Unless you can put a span inside of it, you won't be able to. – Dan Grahn Jun 28 '13 at 21:47
  • If you give an example of what you need, I can try to duplicate it. – Dan Grahn Jun 29 '13 at 19:16