I have 2 inputs, a username and a password. I've aligned them in the middle, but I can't figure out how to push them lower down the screen and stay in the middle. Can anyone send me a reference to do so?
Asked
Active
Viewed 93 times
-2
-
4Can you please post your code and update with what you have tried. – PseudoAj Aug 22 '17 at 21:53
-
Possible duplicate of [How to position a div in the middle of the screen when the page is bigger than the screen](https://stackoverflow.com/questions/5012111/how-to-position-a-div-in-the-middle-of-the-screen-when-the-page-is-bigger-than-t) – mrogers Aug 22 '17 at 22:02
2 Answers
0
It sounds something you can use Flexbox for. Make the containing div a flexbox and then justify and align to the center.

smthngfrnthng
- 83
- 5
0
It's hard to tell what exactly you are trying to do without the relevant code, but here's a solution that might work for you:
form {
text-align: center;
}
input {
position: relative;
top: 50px;
}
<form>
<input type="text" placeholder="name" />
<input type="password" placeholder="password" />
</form>

Chava Geldzahler
- 3,605
- 1
- 18
- 32