WorknHardr
asked on
MVC4 Editor Template TextBoxFor Width CSS Not Working?
I'm now using TextBoxFor instead of EditorFor so I can at least simplify the CSS.
I really want to set the CSS in the style sheet.
I'm beginning to wonder if Editor Templates are still a bit buggy...
This works locally!
@Html.TextBoxFor(x => x.Amount, new { style="width:75px" })
This does NOT work using style sheet!
@Html.TextBoxFor(x => x.Amount, null, "Amount" )
@Html.TextBoxFor(x => x.Amount, new { @class = "amount" })
[Style Sheet]
#Amount
{
width: 75px
}
.amount
{
width: 75px
}
I really want to set the CSS in the style sheet.
I'm beginning to wonder if Editor Templates are still a bit buggy...
This works locally!
@Html.TextBoxFor(x => x.Amount, new { style="width:75px" })
This does NOT work using style sheet!
@Html.TextBoxFor(x => x.Amount, null, "Amount" )
@Html.TextBoxFor(x => x.Amount, new { @class = "amount" })
[Style Sheet]
#Amount
{
width: 75px
}
.amount
{
width: 75px
}
Is the CSS style linked properly?
ASKER
Do I need to place a style sheet link in the editor template?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for helping...