Because you set it to 100% width. Relative width, such as your percentage, refers to the width of the PARENT element. Therefore, if your container for these 3 sections was 600px, then you will get your third div, taking 100% 600px, and not the "remaining" space spent by the other two elements.
What you want cannot be done with simple CSS. You will need to calculate the remaining space using Javascript and set the third width of the div as well as make it a fixed width.
source share