html - Change style inline to css -
i have these form style inline, can't use in css because changes code when reference css in views:
<style> body { background: url('http://digitalresult.com/') fixed; background-size: cover; padding: 0; margin: 0; } .form-login { background-color: #ededed; padding-top: 10px; padding-bottom: 20px; padding-left: 20px; padding-right: 20px; border-radius: 15px; border-color:#d2d2d2; border-width: 5px; box-shadow:0 1px 0 #cfcfcf; opacity: 0.8; } h4 { border:0 solid #fff; border-bottom-width:1px; padding-bottom:10px; text-align: center; } .form-control { border-radius: 10px; } .wrapper { text-align: center; } </style> @using (html.beginform("login", "account", new { returnurl = viewbag.returnurl }, formmethod.post, new { @class = "form-horizontal", role = "form" })) { @html.antiforgerytoken() @html.validationsummary(true, "", new { @class = "text-danger" }) <div class="container" style="margin-top:40px"> <div class="row"> <div class="col-sm-6 col-md-4 col-md-offset-4"> <div class="panel panel-default form-login"> <div class="panel-heading"> <strong> press continue</strong> </div> <div class="panel-body"> <form role="form" action="#" method="post"> <fieldset> <div class="row"> </div> <div class="row"> <div class="col-sm-12 col-md-10 col-md-offset-1 "> <div class="form-group"> <div class="input-group"> <span class="input-group-addon"> <i class="glyphicon glyphicon-user"></i> </span> @html.textboxfor(m => m.email, new { @class = "form-control has-success", @autofocus = "autofocus", placeholder = "usuario", required = "required" }) @html.validationmessagefor(m => m.email, "", new { @class = "text-danger" }) </div> </div> <div class="form-group"> <div class="input-group"> <span class="input-group-addon"> <i class="glyphicon glyphicon-lock"></i> </span> @html.textboxfor(m => m.password, new { @class = "form-control has-success", placeholder = "password", type = "password", required = "required" }) @html.validationmessagefor(m => m.password, "", new { @class = "text-danger" }) </div> </div> <div class="form-group"> <button class="btn btn-lg btn-primary btn-block" type="submit">login</button> </div> <p>@html.actionlink("return home page", "index", "home")</p> </div> </div> </fieldset> </form> </div> </div> </div> </div> </div>
i think problem if send body
class css changes on pages reference css, how can change change in view? regards
instead of changing in file, may add style in page through tag or give inline style style element if need change @ 1 place. adding inline style should avoided. better differentiate element id , give properties it
Comments
Post a Comment