css - How do you put two divs next to each other so they fill up the available space -


i have 2 divs, right 1 80px wide other should fill remaining space. far tried:

<!doctype html>  <html> <head>     <title>#{get 'title' /}</title>     <style type="text/css">         body {             margin: 0;             padding: 0;         }          #left {             position: relative;             margin-right: 80px;             background-color: red;         }          #right {             float: right;             position: relative;             text-align: left;             width: 80px;             background-color: yellow;         }     </style> </head> <body> <div id="left">     left </div> <div id="right">     right </div> </body> </html> 

however, right box put below left box , not right it. guess because of margin. tried margin-left: -80px on right 1 doesnt seem change anything. how have change css right div in same line left div?

have right div before left.

<div id="right">     right </div> <div id="left">     left </div> 

working example


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -