Jan 22, 2015, 5:45 PM
[CLOSED] CSS Class : How to set CSS class to TextField
I am trying to add a css class to text field.my code like bellow.but textfield not take effect
@using Ext.Net.MVC
@Html.X().ResourceManager()
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Index</title>
<style>
.input {
border: 1px solid #CCCCCC;
font-size: 14px;
font-weight: bold;
width: 225px;
height: 18px;
margin-top: 2px;
padding: 5px 2px 2px;
}
</style>
</head>
<body>
<div>
@(Html.X().TextField()
.ID("txtUsername")
.ReadOnly(false)
.HideLabel(true)
.AllowBlank(false)
.Border(false)
.BlankText("Your username is required.")
.Cls("input")
)
<br />
<input name="txtPass" type="password" id="txtPass" tabindex="3" class="input" />
</div>
</body>
</html>
Last edited by Daniil; Jan 30, 2015 at 1:33 PM.
Reason: [CLOSED]