开发者

CSS style override default textbox border to create invisible border?

I want to display a text box in css/razor without the border (well, as white background) but it's picking up the color value from it's parent.

Q: How can I override the default value in the parent css style so my textbox value looks like a label (white background color)?

input[type="text"], 
input[type="password"], select {
border: 1px solid #93A9C8;  }

.TextBoxAsLabel
{
   border: none;
   background-color:开发者_StackOverflow中文版 #fff;
   background: transparent;
}

-- Called from razor page --

@Html.TextBoxFor(m => m.ImpToDate, new { @class = "TextBoxAsLabel" })


try: input.TextBoxAsLabel

This makes your class more specific and will probably override the previous one.


Simply change the border value from none to 0 (zero)

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜