html - Not able to center Input elements in Div -
I have tried googling but with no help, most of them margin: auto And there are many questions on the stack overflow with the same problem, most of them have answers in the form of margins: Auto I am implementing the same solution which is not working for me < / P> HTML CSS First, delete the block from the old Old
& lt; Div id = "content" class = "lcard" & gt; & Lt; Center & gt; & Lt; H1 class = "n" & gt; View your & lt; Br> Sign in to Crawler Account & lt; / H1> & Lt; Br> & Lt; Form onsubmit = "return validateForm ()" method = "post" & gt; & Lt; Center & gt; & Lt; Input name = "email" required type = "email" placeholder = "email" & gt; & Lt; Input name = "password" required type = "password" placeholder = "password" & gt; & Lt; Button type = "submit" square = "b" & gt; & Lt; B & gt; Sign in & lt; / B & gt; & Lt; / Button & gt; & Lt; / Center & gt; & Lt; P id = "reg" & gt; & Lt; A href = "c: /lcrawl/register.html" & gt; Please register new user & lt; / A & gt; & Lt; / P & gt; & Lt; / Form & gt; & Lt; / Div & gt;
.lcard {background color: #EEEEEE; Height: 400px; Width: 400px; Margin: left; }. N {margin-bottom: 50; Left: -50%; } Input {padding: 5 10px; Width: 274px; Height: 44px; Margins: Auto; }. B {boundary: 1 px solid; Background color: # 3079ed; Width: 274px; Height: 44px; Margins: Auto; }
center Simply apply
text-align: center to form and header.
N {text-align: center; }
Comments
Post a Comment