Creating a div whose size is relative to a fixed width div and containing area?

css, html

Solution

The following should do it:

#contentBody{
  width:N%
}
#div contentLeft{
  width:205px;
  float:left;
}

#div contentRight{
  margin-left:205px;
}

Problem

I have a containing div (contentBody) that is N% wide. Within that div I have two other divs, contentLeft and contentRight. contentLeft is always 205px. I want contentRight to automatically fill the remaining space in contentBody. How can I achieve this? ``` #div contentLeft{ width:205px; float:left; } #div contentRight{ width:<**100% - 205px**>; float:left; } ``` Edit: Sorry, I meant to write "N%" instead of 100%, this needs to work for a containing area of any percentage or size.

Original source