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

enter image description here

you can use

 #sidebar{      float: left;      width: calc(100% - 840px);  } 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -