I have the following HTML:
Is it possible to give the body tag a style based on the <div> with a class of .all?
I want to do this only with CSS.
No it's not possible yet in CSS.
It is proposed in Editors draft selectors level 4 which has just been released a few weeks ago. So you will be good to go in a few years time.