Просмотр исходного кода

use more CSS for dynamic height demo

Adam Shaw 9 лет назад
Родитель
Сommit
0da65c416d
1 измененных файлов с 22 добавлено и 15 удалено
  1. 22 15
      tests/fullheight.html

+ 22 - 15
tests/fullheight.html

@@ -69,34 +69,41 @@
 				}
 			],
 			weekMode: 'liquid',
-			height: calcCalendarHeight
+			height: 'parent'
 		});
 		
-		function calcCalendarHeight() {
-			var h = $(window).height() - 40;
-			console.log(h);
-			return h;
-		}
-		
 	});
 
 </script>
 <style>
 
+	html, body {
+		margin: 0;
+		padding: 0;
+		height: 100%;
+	}
+
 	body {
-		margin: 20px 200px 20px 20px;
-		text-align: center;
-		font-size: 13px;
+		position: relative;
+		font-size: 14px;
 		font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif;
-		}
+	}
 
-	#calendar {
-		width: 100%;
-		}
+	#calendar-wrap {
+		position: absolute;
+		top: 20px;
+		right: 20px;
+		bottom: 20px;
+		left: 20px;
+	}
 
 </style>
 </head>
 <body>
-<div id='calendar'></div>
+
+	<div id='calendar-wrap'>
+		<div id='calendar'></div>
+	</div>
+
 </body>
 </html>