From 97aa512a41ee18aaf3fdbd1746fdf1d1934888d7 Mon Sep 17 00:00:00 2001 From: bgrins Date: Wed, 23 May 2012 20:37:21 -0500 Subject: [PATCH] add static width example to demo page, and support static width (see Issue #16) --- expanding.js | 3 ++- index.html | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/expanding.js b/expanding.js index dd7d2b2..75d1083 100644 --- a/expanding.js +++ b/expanding.js @@ -30,7 +30,8 @@ 'paddingTop','paddingBottom', 'marginLeft', 'marginRight', 'marginTop','marginBottom', - 'boxSizing', 'webkitBoxSizing', 'mozBoxSizing', 'msBoxSizing' + 'boxSizing', 'webkitBoxSizing', 'mozBoxSizing', 'msBoxSizing', + 'width' ]; var textareaCSS = { diff --git a/index.html b/index.html index 40378f8..1179911 100644 --- a/index.html +++ b/index.html @@ -64,6 +64,10 @@ width: 100%; } +.exampleStaticWidth textarea { + width: 400px; +} + .exampleFonts textarea { font-family: Arial; color: orange; @@ -205,6 +209,20 @@

Maximum Height

+
+

Static Width

+

+ Just set a static width on the textarea, and the pre tag will snap to fit it! + +

+

+textarea {
+    width: 400px;
+}
+ + + +