The problem:
We have a page that ordinarily has two elements arranged side-by-side.
<div id="container">
<div id="element1">content</div><div id="element2">content</div>
</div>
But in some conditions only element2 is on the page e.g.:
<div id="container">
<div id="element2">content</div>
</div>
Despite exploring a few angles for this, we can't seem to make it work. We're not averse to using JS, it just feels that a css based solution ought to be possible.
Can you think of a way of using just css(and possibly extra markup if definitely necessary) to make element 2 center when it appears on its own?