开发者

Styling textbox of an HTML file input

开发者 https://www.devze.com 2022-12-29 22:18 出处:网络
I have an asp.net 2.0 web app where I use C#. I have an HTML file input control that I would like to style, but I can\'t seem to find a way to do it. I actually wanted to change the color of the textb

I have an asp.net 2.0 web app where I use C#. I have an HTML file input control that I would like to style, but I can't seem to find a way to do it. I actually wanted to change the color of the textbox. I looked online but I couldn't find any proper solutions.

Can anyone help?

开发者_Go百科

Thank you.


You could use CSS and redefine the elements or use a div tag.

  1. http://forums.devshed.com/css-help-116/how-to-define-css-styles-for-text-box-input-s-50111.html
  2. http://www.velocityreviews.com/forums/t118125-css-and-textbox.html
  3. You might use an ASP control and get access to properties that way. It has a class property you can define.


You can style the text color of the HTML file input like you can any other element. Works in FF and IE8:

#inputId { color: #ff0000; }

For more involved styling, you'll need to resort to workarounds, like this one.

0

精彩评论

暂无评论...
验证码 换一张
取 消