Make header and footer/form work without overflowing

This commit is contained in:
lilia 2014-07-22 17:26:20 -10:00
parent df95a7f71a
commit 9082781e09
3 changed files with 33 additions and 22 deletions

View file

@ -31,20 +31,21 @@ html {
body { body {
margin:0; margin:0;
padding:0; padding:0;
border:0; /* This removes the border around the viewport in old versions of IE */ border:0;
width:100%; width:100%;
height: 100%; height: 100%;
min-width:400px; /* Minimum width of layout - remove line if not required */ min-width:400px; /* Minimum width of layout - remove line if not required */
/* The min-width property does not work in old versions of Internet Explorer */
} }
/* column container */ /* column container */
.colmask { .colmask {
position:relative; /* This fixes the IE7 overflow hidden bug */ position:relative;
clear:both; clear:both;
float:left; float:left;
width:100%; /* width of whole page */ width:100%; /* width of whole page */
height: 100%; height: 100%;
overflow:hidden; /* This chops off any overhanging divs */ overflow:hidden; /* This chops off any overhanging divs */
padding-top: 50px;
box-sizing: border-box;
} }
/* common column settings */ /* common column settings */
.colleft { .colleft {
@ -52,7 +53,6 @@ body {
width:100%; width:100%;
height: 100%; height: 100%;
position:relative; position:relative;
border-right: 2px solid #acdbf5;
} }
.col1, .col1,
.col2 { .col2 {
@ -73,32 +73,38 @@ body {
.leftmenu .col2 { .leftmenu .col2 {
width:28%; /* left column content width (column width minus left and right padding) */ width:28%; /* left column content width (column width minus left and right padding) */
} }
header {
position: fixed;
width: 100%;
box-sizing: border-box;
padding: 5px 0;
height: 50px;
background-color: #7fd0ed;
}
/* end layout */ /* end layout */
/*
#sidebar {
float: left;
width: 30%;
padding: 1em;
}
#main { #main {
margin-left: 35%; box-sizing: border-box;
padding: 1em; padding-bottom: 100px;
height: 100%;
border-left: 2px solid #acdbf5; border-left: 2px solid #acdbf5;
} }
*/ #main form {
position: absolute;
width: 100%;
padding: 1em;
bottom: 0;
right: 0;
box-sizing: border-box;
height: 100px;
background-color: #ddd;
}
.container { .container {
max-width: 960px;
margin: auto; margin: auto;
padding: 0 1em; padding: 0 1em;
} }
header {
padding: 5px 0;
background-color: #7fd0ed;
}
label { label {
float: left; float: left;

View file

@ -9,7 +9,7 @@ var Whisper = Whisper || {};
itemView: Whisper.MessageView, itemView: Whisper.MessageView,
render: function() { render: function() {
$('#main').html('').append(this.el); $('#main .message-container').html('').append(this.el);
} }
}); });
})(); })();

View file

@ -37,6 +37,11 @@
<div id="listener"></div> <div id="listener"></div>
<div id="log"></div> <div id="log"></div>
</div> </div>
<div class='message-container'></div>
<form id="new-message" class='clearfix'>
<input id="send_numbers" type='text' placeholder="+xxxxxxxxxx">
<input type=submit id="compose-message" class='btn btn-square' value='>'>
</form>
</div> </div>
<div id='sidebar' class="col2"> <div id='sidebar' class="col2">
<form id="send" class='clearfix'> <form id="send" class='clearfix'>