Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make a Html.TextBoxFor look like a Label

I would like to make the textbox in MVC 3 display like a label. The code i have still shows the border.

<p>@Html.TextBoxFor(m => m.PostcardsperWeek, new Dictionary<string, object>() { 
   { "id", "txtPostcardPerWeek" }, 
   { "readonly", "true" }, 
   {"class", "TextBoxAsLabel"} })
</p>

css:

.TextBoxAsLabel
{
   border: none;
   background-color: #fff;
   background: transparent;
}
like image 775
bladerunner Avatar asked Feb 02 '23 21:02

bladerunner


1 Answers

Make the border the same color as your background.

like image 157
TheGeekYouNeed Avatar answered Mar 20 '23 17:03

TheGeekYouNeed