i have a layout like this :

Code:
<div id="main" style="width:100%; height:500px; background-color: #ccc;">
    <div id="right" style="float: right; width:100px; height:500px; background-color: red;">
    </div>
    <div id="left" style="margin-right: 100px; height:500px; background-color: orange;">
    </div>
</div>
how can i make the left div width flexible when the right div is not present in page, something like sidebar that are not present in all pages