"Full Page Log In With Background"
Bootstrap 3.0.0 Snippet by BhaumikPatel

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<div class="container">
<div class="row">
<div class="col-md-4 col-md-offset-7">
<div class="panel panel-default">
<div class="panel-heading">
<span class="glyphicon glyphicon-lock"></span> Login</div>
<div class="panel-body">
<form class="form-horizontal" role="form">
<div class="form-group">
<label for="inputEmail3" class="col-sm-3 control-label">
Email</label>
<div class="col-sm-9">
<input type="email" class="form-control" id="inputEmail3" placeholder="Email" required>
</div>
</div>
<div class="form-group">
<label for="inputPassword3" class="col-sm-3 control-label">
Password</label>
<div class="col-sm-9">
<input type="password" class="form-control" id="inputPassword3" placeholder="Password" required>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<div class="checkbox">
<label>
<input type="checkbox"/>
Remember me
</label>
</div>
</div>
</div>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
body {
background: url(http://lorempixel.com/1920/1920/city/9/) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
.panel-default {
opacity: 0.9;
margin-top:30px;
}
.form-group.last { margin-bottom:0px; }
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments:

how can i link the background image in the css file in a different way than the url?

sIKd () - 11 years ago - Reply 0


What do you mean?

maxsurguy () - 11 years ago - Reply 0


can i call the background image using <img/> or some other way? Instead of url() ?

sIKd () - 11 years ago - Reply 0


it's the same thing... you would specify the relative URL. Like this : url("./images/bg.png")

maxsurguy () - 11 years ago - Reply 0


this is not all the CSS cause the windows i have it on the left & with no backgroung & button style ?? :/

hamza () - 11 years ago - Reply 0


You need the Bootstrap 3 CSS from getboostrap.com

merlin () - 11 years ago - Reply 0


how did you get it so that it takes up the top half of the page and then something else (this comments section) sows up nicely below

mbaxme () - 11 years ago - Reply 0


I am using an iFrame to hold the snippet content, and the rest of the page is just Bootstrap

maxsurguy () - 11 years ago - Reply 0


Hi, how can I centralize the form in the page?

Venicio Antunes () - 11 years ago - Reply 0


Change <div class="col-md-4 col-md-offset-7"> to <div class="col-md-4 col-md-offset-4">

Huy Trịnh () - 11 years ago - Reply 0


wich rights we have on the background?

Mounssif () - 11 years ago - Reply 0


Thanks! :)

Alex () - 11 years ago - Reply 0