I have a page "create.php" which looks fine on Computers with normal width and height:
When I resize page smallest width it can go:
When I run on Mobile device(samsung galaxy S9):
Here is my CSS code:
img {
margin-left: 30px;
margin-top: 15px;
}
.input {
margin-bottom: 50;
position: absolute;
top: 160%;
left: 50%;
transform: translate(-50%, -50%);
border: 1px solid grey;
border-radius: 35px;
padding-left: 25px;
padding-right: 25px;
padding-top: 35px;
padding-bottom: 25px;
}
Here is the input
div
<div class="input">
<h1>Create a quiz game!</h1>
<form action="create.php" method="post">
<!-- A big form -->
</form>
</div>
Basically, I want to change the CSS so that all of the gaps are fine. Does anyone have any idea how to do this?
I have tried to change my form so it works better, but the issue of it moving up still works sometimes...
The media query is good, but it is very timeconsuming to do it manually for lots of screen sizes..
Is there a CSS library like bootstrap that can make it better... Maybe I have to use container divs?