I have the following markup:
<nav id='tab_links'>
<a href='#view1'>One</a>
<a href='#view2'>Two</a>
</nav>
<div id='container'>
<div id='view1'>Short Content</div>
<div id='view2'>Much longer content</div>
</div>
<footer>
<input type='submit' />
</footer>
and the following styles:
#view2 { display: none; }
#footer { display: block; clear: both; text-align: right; }
#footer * { display: inline-block; text-align: center; }
I use the following jQuery to swap out the views:
$('#tab_links a').click(function() {
var tabToShow = $($(this).attr('href'));
var otherTabs = tabToShow.siblings();
tabToShow.show();
otherTabs.hide();
});
When I swap out the view1 content for the view2 content, the footer stays where it was, hovering above the middle of the new content. If I hover the mouse over the footer content, it jumps down into place. If I then revert the content back to view1, the footer again stays where it was for view2, which is far below the end of the container.
What styles can I apply to make IE reposition the footer appropriately? I've tried all of the following, in various combinations:
- apply
clearfixto#container - apply
clearfixto#footer - apply
height: autoto#container - apply
height: 30pxto#footer input - apply
widgth: 100pxto#footer input