When it comes to my design preferences, I always aim for textboxes with a proper style.
For instance:
@Html.TextBoxFor(m => m.Number, new {disabled = "disabled", @class = "special-container"})
And in the .css file:
.special-container
{
background: -webkit-linear-gradient(#ffffff, #656565 50%);
background: -o-linear-gradient(#ffffff, #656565 50%);
background: -moz-linear-gradient(#ffffff, #656565 50%);
background: linear-gradient(#ffffff, #656565 50%);
border-left:1px solid #000000;
border-right:1px solid #000000;
border-top:1px solid #000000;
border-bottom:1px solid #000000;
color: red;
width:90%;
font-size: 12px;
font-weight: 600;
}
Although half of the properties work correctly - such as borders and background - the color, font, and width are totally ignored and I can't seem to figure out why. When I add an attribute that was previously ignored, like color:
Style = "color:red"
It functions as expected.
So, my query is, what am I doing incorrectly if the styles in the .css file are disregarding certain properties, but they still function when added as attributes? What should be the correct outcome?
P.S Apologies for any language errors.