Is it possible to set the width of a div to be the same as it's closest sibling when the width on that div is width: auto;?
In my jsFiddle
you will see that I have a red, green and blue div. I want the blue div to adjust to the size of the green div (which is dynamic). So if the green div works out to be 200px then I want the blue div to be 200px.
Originally I thought I would be able to put the blue div inside the green one and set display: inline-block on the child, but this does not work.
So, if the content of the blue div increases then it won't push the width of the green div out (or the container div). How can this be achieved?