From be9b97f4ddd45dbb3fe6a48d49af17bb41cbea68 Mon Sep 17 00:00:00 2001 From: Igor Vaynberg Date: Fri, 6 Jul 2012 12:30:51 +0300 Subject: [PATCH] added responsive design example. issue #115 --- select2-latest.html | 20 ++++++++++++++++++++ select2-master | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/select2-latest.html b/select2-latest.html index a7832459..e5bd6f1e 100755 --- a/select2-latest.html +++ b/select2-latest.html @@ -785,6 +785,26 @@ $("#e17").select2({ +
+ +
+

Responsive Design - Percent Width

+

Select2's width can be set to a percentage of its parent to support responsive design. The two Select2 boxes below are styled to 50% and 75% width respectively.

+


+


+

Select2 will do its best to resolve the percent width specified via a css class, but it is not always possible. The best way to ensure that Select2 is using a percent based width is to inline the style declaration into the tag.

+
+
+

Example Code

+
+           
+
+
+ diff --git a/select2-master b/select2-master index 9c864f1d..77de06ec 160000 --- a/select2-master +++ b/select2-master @@ -1 +1 @@ -Subproject commit 9c864f1da01bef52c32f9d3c3a8cdd0cc2dadd35 +Subproject commit 77de06ecf3642cd59d101f48a1e5ed811a064f2b