html - Dynamic sidebar width depending on the main div -
i have following code
<div id="content"> <div id="sidebar"></div> <div id="main"></div> </div>
and css
#main{ width: 840px; margin: 0 auto; } #sidebar{ float: left; width: ?; -> need fill dhe auto space }
the problem how can make #sidebar div fill space left main div? image shows want
you can use
#sidebar{ float: left; width: calc(100% - 840px); }
Comments
Post a Comment