My problem is that I don't know how to move a div container, if another container is empty. My structure looks like this:
HTML:
<div id="wrapper">
<div id="child1">
Some content....
</div>
<div id="child2"></div>
</div>
CSS:
#wrapper
{
/* nop */
}
#child1
{
transform: translate(0, -3950px);
}
#child2:empty #child1
{
transform: translate(0, -4100px);
}
I know that my #child1 is not inside #child2 but how can I select #child1 if #child2 is empty? Is there a special css trick?