asp.net mvc - how to put login form @ center of screen -


I am developing MVC 3 applications with it, I am using Bootstrap for design. I have created the log in form I am trying to set it in the center of the screen but how nothing is working

this is my code

  @using (Html.BeginForm ("LoginUser", "Login", FormMethod.Post)) {& lt; Div class = "container-liquid" style = "padding-left: 0 pixel; margin-top: 165px; margin-left: 140px;" & gt; & Lt; Div class = "line-fluid" & gt; & Lt; Div square = "span12 spaced offset 4" style = "width: 400px; height: 250px;" & Gt; ......... ... control ... .... .... & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; }   

What to do? & lt; Center & gt;

The margin auto does this for you>.

  & lt ;! DOCTYPE html & gt; & Lt; Html & gt; & Lt; Top & gt; & Lt; Title & gt; Login & lt; / Title & gt; & Lt; Style type = "text / css" & gt; # Login box {margin: 20% auto; Width: 200px; } & Lt; / Style & gt; & Lt; / Head & gt; & Lt; Body & gt; & Lt; Form action = "index.php" method = "post" id = "login box" & gt; & Lt; Input type = "text" name = "user" placeholder = "user name" autocapitalize = "off" /> & Lt; Br / & gt; & Lt; Input type = "password" name = "pass" placeholder = "password" /> & Lt; Br / & gt; & Lt; Input type = "checkbox" name = "remember" & gt; Remember me & lt; Br / & gt; & Lt; Input type = "submit" value = "login" name = "login" /> & Lt; / Form & gt; & Lt; / Body & gt; & Lt; / Html & gt;    

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -