From 9082781e0927ca9bfb5188d51ca67065b749de0a Mon Sep 17 00:00:00 2001 From: lilia Date: Tue, 22 Jul 2014 17:26:20 -1000 Subject: [PATCH] Make header and footer/form work without overflowing --- css/popup.css | 48 ++++++++++++++++++++--------------- js/views/message_list_view.js | 2 +- popup.html | 5 ++++ 3 files changed, 33 insertions(+), 22 deletions(-) diff --git a/css/popup.css b/css/popup.css index 1f497784..1ba10c3b 100644 --- a/css/popup.css +++ b/css/popup.css @@ -31,20 +31,21 @@ html { body { margin:0; padding:0; - border:0; /* This removes the border around the viewport in old versions of IE */ + border:0; width:100%; height: 100%; 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 */ .colmask { - position:relative; /* This fixes the IE7 overflow hidden bug */ + position:relative; clear:both; float:left; - width:100%; /* width of whole page */ + width:100%; /* width of whole page */ height: 100%; overflow:hidden; /* This chops off any overhanging divs */ + padding-top: 50px; + box-sizing: border-box; } /* common column settings */ .colleft { @@ -52,7 +53,6 @@ body { width:100%; height: 100%; position:relative; - border-right: 2px solid #acdbf5; } .col1, .col2 { @@ -73,32 +73,38 @@ body { .leftmenu .col2 { 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 */ -/* -#sidebar { - float: left; - width: 30%; - padding: 1em; -} - #main { - margin-left: 35%; - padding: 1em; + box-sizing: border-box; + padding-bottom: 100px; + height: 100%; 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 { - max-width: 960px; margin: auto; padding: 0 1em; } -header { - padding: 5px 0; - background-color: #7fd0ed; -} label { float: left; diff --git a/js/views/message_list_view.js b/js/views/message_list_view.js index b7224c9c..f7d7c984 100644 --- a/js/views/message_list_view.js +++ b/js/views/message_list_view.js @@ -9,7 +9,7 @@ var Whisper = Whisper || {}; itemView: Whisper.MessageView, render: function() { - $('#main').html('').append(this.el); + $('#main .message-container').html('').append(this.el); } }); })(); diff --git a/popup.html b/popup.html index e91d586a..caca092c 100644 --- a/popup.html +++ b/popup.html @@ -37,6 +37,11 @@
+
+
+ + +