Struggling to center my <div class="loginfeld">
while keeping it responsive.
<html>
<body>
<div class ="loginfeld">
<div class="container">
<div class="col-lg-4"></div>
<div class="col-lg-4">
<div class="jumbotron">
<center><h1>Hello!</h1></center>
<br>
<form action="login.php" method="POST">
<div class="form-group">
<input type="text" class="form-control" name="username"
placeholder="Enter Username">
</div>
<div class="form-group">
<input type="password" class="form-control" name="password"
placeholder="Enter Password">
</div>
<button type="submit" class="btn
btn-primary form-control" name ="login">Login</button>
<center><p><?php echo $message; ?></p></center>
</form>
</div>
</div>
<div class="col-lg-4"></div>
</div>
</div>
</body>
</html>
In my CSS style file:
.loginfeld{
margin-top: 250px;
margin-left: 750px;
max-width: 1000px;
}
Currently, it is centered on the screen but lacks responsiveness. Attempts to use forum-suggested codes for responsive centering have not been successful.
After implementing the code suggested by K_LUN, it is now correctly centered but the login box layout is distorted. https://i.sstatic.net/0fDFB.png