I’m at the beginning stages to start experimenting with an administration panel that needs to be flexible enough to fit variety of resolutions and platforms and be bulletproof enough to degrade gracefully on older browsers.
I started with some bare-bone example, and I want to be sure that it does not breaks on older browsers, not even in IE 7.
I have a header and footer that are always 100% width. The whole layout is fluid, so by default the secondary navigation needs to have a fixed width and sit on the left side, while the main area needs to fill the remaining width of the page. The main navigation should be 100% width and just above the header.
When the resolution goes below 1000px (tablets and mobile devices) the secondary navigation should stack right below the main navigation, so the main area gets to be 100% width.
When the site is browser an large screens, now it should get 3 column layout. The main navigation on the left, then the secondary navigation in the middle, and the main area to fit the remaining width.
The HTML code I’m using:
<header id="header">
Header
</header>
<nav id="nav-primary">
Primary navigation
</nav>
<nav id="nav-secondary">
Secondary navigation
</nav>
<div id="main">
Main section
</div>
<footer id="footer">
Footer
</footer>
The default CSS:
#header {
background: #54616b;
color: #CCC;
}
#nav-primary {
background: #333;
}
#nav-secondary {
float: left;
width: 200px;
background: #eee;
}
#main {
margin-left: -200px;
background: #fff;
}
#footer {
clear: both;
background: #54616b;
color: #CCC;
}
And the media-queries CSS:
@media (max-width: 1000px) {
#nav-secondary {
float: none;
width: 100%;
}
#main {
margin-left: 0px;
}
}
@media (min-width: 1260px) {
#nav-primary {
float: left;
width: 80px;
}
#nav-secondary {
float: left;
width: 220px;
}
#main {
margin-left: -300px;
}
}
Is there anything left that I need to include in the CSS in order to be sure it does not break on older browsers? Any tips are welcomed.