Guest User

Guest User

  • Tech Writer
  • 2.1k
  • 470.4k

How to align your text input on login.cshtml in the center?

Jan 21 2020 2:57 PM
Hi team
 
I have an image its on the center, now i want to figure it out as well on my text input for both user and password, including buttons as well. Here is my code below for this logic;
 
 
div data-="mainContent">
<section class="container">
<div class="logo col-sm-12 text-center col-md-12"> <img alt="" src="~/Images/eNtsa.png" /></div>
<div class="clearfix"></div>
<div class="innerContainer">
<div class="row">
<div id="MyWizard" class="formArea LRmargin">
@using (Html.BeginForm())
{
@Html.AntiForgeryToken()
<div id="divMessage" class="text-center col-md-5 col-md-offset-5 alert-success">
@Html.ValidationSummary()
</div>
<div class="glyphicon-log-out col-sm-17 text-center col-md-15"> <img alt="" src="~/Images/gcobani.jpg" /></div>
<div class="col-md-10 col-md-offset-10 col-xs-12">
<div class="loginPage panel-info">
<span class=""><i class="glyphicon glyphicon-user">User</i></span>
<div class="form-group">
@Html.TextBoxFor(model => model.username, new { @class = "form-control", autocomplete = "off" })
@Html.ValidationMessageFor(model => model.username)
</div>
<div class="form-group">
<span class=""><i class="glyphicon glyphicon-user">Password</i></span>
@Html.PasswordFor(model => model.password, new { @class = "form-control", autocomplete = "off" })
@Html.ValidationMessageFor(model => model.password)
</div>
</div>
<div class="form-group">
<input id="BtnLogin" type="submit" class="btn btn-success btn-pressure" name="BtnLogin" value="Login" />
<input id="BtnReset" type="reset" value="Create" class="btn btn-info btn-pressure" name="BtnReset" value="Reset" />
</div>
</div>
}
<div class="clear"></div>
</div>
</div>
</section>
</div>

Answers (2)