I am trying to implement a CSS3 animation on my site where 2 divs would squeeze together another div with a background image. It's pretty hard to explain, so I made a quick video. Please note that the problem I want to solve is present on this video.
What I'd like to do is when animating the height of a div, it wouldn't shrink to it's horisontal center instead of it's top. Can this be done in any way?
My HTML:
<div id="container">
<div id="top-bar">
<ul id="nav">
<li><a href="index.php">Főoldal</a>
</li>
<li><a href="szolgaltatasok.html">Szolgáltatások</a>
</li>
<li><a href="portfolio.php">Portfólió</a>
</li>
<li><a href="kapcsolat.html" id="kapcsolat">Kapcsolat</a>
</li>
</ul>
</div>
<div id="content">
<div id="card">
<!-- The orange card : irrelevant -->
</div>
<div id="main">
<div id="inner-content"></div>
</div>
</div>
<div id="bottom-bar">
<div id="logo">
<!-- Logo Image -->
</div>
</div>
</div>
Please check the jsFiddle examples for the full code.