"Background image full width and height"
Bootstrap 4.0.0 Snippet by prabu0301

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <div class="bg-img"> <div class="row"> <div class="col-lg-6 login-panel"> <form class="form-horizontal"> <fieldset> <!-- Form Name --> <legend>Form Name</legend> <!-- Text input--> <div class="form-group"> <label class="col-md-12 control-label" for="Login">Login</label> <div class="col-md-12"> <input id="Login" name="Login" type="text" placeholder="" class="form-control input-md"> </div> </div> <!-- Password input--> <div class="form-group"> <label class="col-md-12 control-label" for="passwordinput">Password</label> <div class="col-md-12"> <input id="passwordinput" name="passwordinput" type="password" placeholder="" class="form-control input-md"> </div> </div> <!-- Button (Double) --> <div class="form-group"> <label class="col-md-12 control-label" for="buttonLogin"></label> <div class="col-md-8"> <button id="buttonLogin" name="buttonLogin" class="btn btn-success">Login</button> <button id="buttonRegistry" name="buttonRegistry" class="btn btn-primary">Registry</button> </div> </div> </fieldset> </form> </div> </div> </div>
body, html { margin:0; padding:0; overflow-x:hidden; } .bg-img { background-image: url(http://placehold.it/100x100); position:absolute; top:0; left:0; right:0; bottom:0; background-size:cover; background-position: center; } .login-panel{ padding:7% 5%; }

Related: See More


Questions / Comments: