I was wondering if one CSS3 gradient background can be applied to multiple elements. In other words, the gradient extends to the parent element, but is visible only inside the child elements.
After searching, I found this topic: Applying a gradient over multiple views
This is exactly my problem, although I need it as CSS/HTML code.
To visualize the problem, I took two photos:

This is a basic setting. Two <div> that need a gradient background are inside the larger <div> element.

As you can see, the gradient in the second image quickly disappears from element A to element B. This effect is easily implemented in most image editing programs, so I could just use a suitable image to get the desired effect.
However, since images are probably not the best way to solve this problem, I hope to find an answer here on how to do this only with CSS . I used to use gradients, but I have not yet found a solution to this problem myself.
Any help is appreciated.
EDIT (06/01/15 13:30 GMT + 1): Elements A and B should have round corners. The encompassing gradient was supposed to be radial-gradient , but this is not necessary. Perhaps the problem is really not solvable.
source share