ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
How to add width to Html.EditorFor that use Html.Awe().TextBox(
Title:
B
I
{code}
?
I happened to notice that there is no width property in *Html.Awe().TextBox*, is there any walkaround while using it to add width to my EditorFor items.
Save Changes
Cancel
Baha' Al Fataftah
asked at 03 Feb 2015
Answers
B
I
{code}
?
you could add the width like this: @Html.Awe().TextBox("Number").HtmlAttributes(new { style="width:300px;"}) but a good practice would be to add it using css, like this: .input[type="text"]{ width:300px; } of course you can create lots of other css rules, for example you can make all textboxes inside a div with class small width = 50 like this: .small input[type="text"]{ width:50px; }
Save Changes
Cancel
Omu
answered at 03 Feb 2015
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK