Weird tab height when using side menu.
When using the following html5 structure - and jquery ui tabs -> the tab headers are showing as
the same height as the side menu:
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset="UTF-8">
- <title>Title goes here!</title>
- <link rel="stylesheet" href="style/reset.css" type="text/css" />
- <link rel="stylesheet" href="style/main.css" type="text/css" />
- <!--[if lt IE 9]>
- <script src="scripts/html5shiv.min.js"></script>
- <![endif]-->
- <script src="scripts/jquery-1.10.2.min.js"></script>
- <link rel="stylesheet" href="style/smoothness/jquery-ui-1.10.4.min.css" type="text/css" />
- <script src="scripts/jquery-ui-1.10.4.min.js"></script>
- <script>
- $(function() {
- $("div#tabs", "div#wrapper > section").tabs();
- });
- </script>
-
- <script type="text/javascript">
- $(document).ready(function() {
- $('nav > ul > li:has("ul")').children('a')
- .attr('href', '#')
- .click(function(){
- $(this).siblings('ul').slideToggle();
- return false;
- });
- });
- </script>
- </head>
-
- <body>
- <header>
- <h1>Main Header</h1>
- </header>
- <nav><!-- Breadcrumbs not used! --></nav>
- <div id="wrapper">
- <!-- Main Menu -->
- <nav>
- <ul>
- <li><a id="Menu1" href="#">Menu Item 1</a></li>
- <li><a id="Menu2" href="#">Menu Item 2</a></li>
- <li><a id="Menu3" href="#">Menu Item 3</a></li>
- <li><a id="Menu4" href="#">Menu Item 4</a></li>
- <li>
- <a id="Menu5" href="#">Menu Item 5</a></li>
- <ul>
- <li><a id="SubMenu1" href="#">Sub Menu Item 1</li>
- <li><a id="SubMenu2" href="#">Sub Menu Item 2</li>
- <li><a id="SubMenu3" href="#">Sub Menu Item 3</li>
- </ul>
- </li>
- </ul>
- </nav>
-
- <!-- Main Document Content -->
- <section class="smoothness">
- <div id="tabs">
- <ul>
- <li><a href='#Tab1'>Tab 1</a></li>
- <li><a href='#Tab2'>Tab 2</a></li>
- <li><a href='#Tab3'>Tab 3</a></li>
- </ul>
- <article id="Tab1">
- <h1>Tab 1</h1>
- <article>
- <p>Contents of Tab 1</p>
- </article>
- </article>
- <article id="Tab2">
- <h1>Tab 2</h1>
- <article>
- <p>Contents of Tab 2</p>
- </article>
- </article>
- <article id="Tab3">
- <h1>Tab 3</h1>
- <article>
- <p>Contents of Tab 3</p>
- </article>
- </article>
- </div>
- </section>
- </div>
-
- <!-- Main Document Footer -->
- <footer>
- <a href="http://www.freevirtualservers.com/" target="_blank">Website Hosted by Free Virtual Servers</a>
- </footer>
- </body>
- </html>
The CSS makes sure that the footer sticks to the bottom of the page.
Any help is appreciated (I'll try and get a live version up when possible).