I have a responsive layout with 2 colums (main & sidebar). The side bar has a fixed width and the main column's width is responsive. do to the sidebar being a fixed width, I can't set the main column to 100% without the sidebar dropping down obviously. Is there any way to let javascript calculate the width of the main column depending on browser size? (taking into account the fixed width column that should be next to it)
#main {
background-color: #0F0;
float: left;
height: 400px;
width: 100%;
}
#sidebar {
background-color: #C60;
float: right;
height: 400px;
width: 300px;
}
<div id="main">
</div>
<div id="sidebar">
</div>