I have adjusted web-tiki's responsive square elements and I want to create a login screen.
On the login screen I want to use a header, and have the rest of the page fill the height and width of the screen precisely. It should look as follows filling the width and height:
Right now the code does not accomplishes this since the [FILL REST OF WIDTH AND HEIGHT WITH BACKGROUND IMAGE] part just resizes outside of my control.
HTML:
<div id="top">
<h1>My header</h1>
</div>
<!-- Fixed main screen -->
<div id="login-screen" class="bg imgloginscreen">
<div class="content rs">
<div class="float-left">Some text, blabla</div>
<div class="float-right">
<form>
<input type="text" value="Username"/><br/>
<button type="submit">Login </button>
</form>
</div>
</div>
</div>
CSS:
/* Responsive square elements stylesheet is adjusted from http://jsfiddle.net/webtiki/MpXYr/3/light/ which was designed by http://web-tiki.com/ */
#top {
clear: both;
margin: 0.25%;
width: 99.5%%;
padding: 0.1%;
background-color: #000;
color: #fff;
}
.imgloginscreen {
background-image: url('http://upload.wikimedia.org/wikipedia/en/3/37/Leaves.JPG');
}
.content {
position: absolute;
height: 90%; /* = 100% - 2*5% padding */
width: 90%; /* = 100% - 2*5% padding */
padding: 5%;
}
/* For responsive images */
.content .rs {
width: auto;
height: auto;
max-height: 90%;
max-width: 100%;
}
.float-left {
float: left;
}
.float-right {
float: right;
}
/* Not sure how to make it fill the rest of screen? */
#login-screen {
float: left;
position: relative;
height: 99.5%;
width: 99.5%;
padding-bottom: 50%;
margin: 0.25%;
overflow: hidden;
background-color: #1E1E1E;
}
body {
font-family: 'Lato',verdana, sans-serif;
font-size: 20px;
color: #fff;
text-align: center;
background: #ECECEC;
margin: 0;
}
I hope someone can help me make it fit in the screen.
Thanks.
JSFiddle: http://jsfiddle.net/2shygbcy/2/