From a776966da35974cc903012c9968b055491190220 Mon Sep 17 00:00:00 2001 From: Fabian Jakobs Date: Mon, 16 May 2011 12:39:57 +0000 Subject: [PATCH] fix left column layout --- demo/demo.js | 5 +- demo/styles.css | 13 +++- index.html | 154 ++++++++++++++++++++++++++---------------------- 3 files changed, 99 insertions(+), 73 deletions(-) diff --git a/demo/demo.js b/demo/demo.js index cd70a622..491c36ea 100644 --- a/demo/demo.js +++ b/demo/demo.js @@ -153,6 +153,7 @@ exports.launch = function(env) { docs.textile.setUndoManager(new UndoManager()); var container = document.getElementById("editor"); + var cockpitInput = document.getElementById("cockpitInput"); env.editor = new Editor(new Renderer(container, theme)); var modes = { @@ -336,7 +337,9 @@ exports.launch = function(env) { } function onResize() { - container.style.width = (document.documentElement.clientWidth - 180) + "px"; + var width = (document.documentElement.clientWidth - 300); + container.style.width = width + "px"; + cockpitInput.style.width = width + "px"; container.style.height = (document.documentElement.clientHeight - 22) + "px"; env.editor.resize(); }; diff --git a/demo/styles.css b/demo/styles.css index 6b774db3..4be33b19 100644 --- a/demo/styles.css +++ b/demo/styles.css @@ -1,5 +1,6 @@ html { height: 100%; + width: 100%; overflow: hidden; } @@ -18,7 +19,7 @@ body { #editor { position: absolute; top: 0px; - left: 180px; + left: 300px; bottom: 0px; right: 0px; background: white; @@ -28,9 +29,17 @@ body { padding: 5px; } +#controls td { + text-align: right; +} + +#controls td + td { + text-align: left; +} + #cockpitInput { position: absolute; - left: 180px; + left: 300px; right: 0px; bottom: 0; diff --git a/index.html b/index.html index 01b9ae1e..59752466 100644 --- a/index.html +++ b/index.html @@ -9,15 +9,16 @@ - - -
+ + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + +
- + + +
- - -
- - -
- - -
- - -
- - -
- - -
- + +
- + + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ + + +
+ +
- + +
+
+
- + +
+