aboutsummaryrefslogtreecommitdiffstats
path: root/demos/tabs/bottom.html
diff options
context:
space:
mode:
authorScott González <scott.gonzalez@gmail.com>2011-08-03 09:57:06 -0400
committerScott González <scott.gonzalez@gmail.com>2011-08-03 09:57:06 -0400
commite7525d76863be54864237d87b9bb8c244f97d604 (patch)
tree58b25ce5109ad234cda6b0e227f9fdfc2f64e88a /demos/tabs/bottom.html
parentbea74f2ae733f0c092a88038c7d054712fbf88ee (diff)
downloadjquery-ui-e7525d76863be54864237d87b9bb8c244f97d604.tar.gz
jquery-ui-e7525d76863be54864237d87b9bb8c244f97d604.zip
Tabs (bottom demo): Fixed styling. Fixes #4785 - Add a tabs demo with the tabs at the bottom.
Diffstat (limited to 'demos/tabs/bottom.html')
-rw-r--r--demos/tabs/bottom.html13
1 files changed, 10 insertions, 3 deletions
diff --git a/demos/tabs/bottom.html b/demos/tabs/bottom.html
index 3ae04cf1f..3417ed94b 100644
--- a/demos/tabs/bottom.html
+++ b/demos/tabs/bottom.html
@@ -12,15 +12,21 @@
<script>
$(function() {
$( "#tabs" ).tabs();
+
+ // fix the classes
$( ".tabs-bottom .ui-tabs-nav, .tabs-bottom .ui-tabs-nav > *" )
.removeClass( "ui-corner-all ui-corner-top" )
.addClass( "ui-corner-bottom" );
+
+ // move the nav to the bottom
+ $( ".tabs-bottom .ui-tabs-nav" ).appendTo( ".tabs-bottom" );
});
</script>
<style>
- #tabs { height: 200px; }
- .tabs-bottom .ui-tabs-nav { position: absolute; left: 0; bottom: 0; right: 0; padding: 0 .2em .2em; }
- .tabs-bottom .ui-tabs-nav li { top: auto; bottom: 0; margin: 0 .2em 1px 0; border-bottom: auto; border-top: 0 !important; }
+ /* force a height so the tabs don't jump as content height changes */
+ #tabs .tabs-spacer { float: left; height: 200px; }
+ .tabs-bottom .ui-tabs-nav { clear: left; padding: 0 .2em .2em .2em; }
+ .tabs-bottom .ui-tabs-nav li { top: auto; bottom: 0; margin: 0 .2em 1px 0; border-bottom: auto; border-top: 0; }
.tabs-bottom .ui-tabs-nav li.ui-tabs-active { margin-top: -1px; padding-top: 1px; }
</style>
</head>
@@ -34,6 +40,7 @@
<li><a href="#tabs-2">Proin dolor</a></li>
<li><a href="#tabs-3">Aenean lacinia</a></li>
</ul>
+ <div class="tabs-spacer"></div>
<div id="tabs-1">
<p>Proin elit arcu, rutrum commodo, vehicula tempus, commodo a, risus. Curabitur nec arcu. Donec sollicitudin mi sit amet mauris. Nam elementum quam ullamcorper ante. Etiam aliquet massa et lorem. Mauris dapibus lacus auctor risus. Aenean tempor ullamcorper leo. Vivamus sed magna quis ligula eleifend adipiscing. Duis orci. Aliquam sodales tortor vitae ipsum. Aliquam nulla. Duis aliquam molestie erat. Ut et mauris vel pede varius sollicitudin. Sed ut dolor nec orci tincidunt interdum. Phasellus ipsum. Nunc tristique tempus lectus.</p>
</div>