My layout is a liquid (98% of the width of the page) containing the box. I have several lines that occupy 100% of the width of this container and have a fixed height.
I need 3 divs (green, red, blue) in each row, but the red div is hidden until it switches, and at that moment it exits. Currently, when a red div opens, depending on the amount of “body text” in the blue div, the blue div will depend on the line.
My goal

Attempt 1
$('#a').click(function() {
$('#tC').animate({width: 'toggle'});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<style>
article, aside, figure, footer, header, hgroup,
menu, nav, section { display: block; }
#container { min-width: 900px; width: 98%; margin: 0 2%; float: left; border: 1px solid #000; height: 145px; overflow: hidden;}
#a, #b, #tC { padding: 20px; font-size: 30px; height: 145px }
#a { background: #0C0; width: 100px; float: left; }
#tC { background: #C00; width: 400px; float: left; margin-right: 20px; }
#b { background: #00C; height: 145px; float: left; position: relative }
#bottom { position: absolute; bottom: 44px; font-size: 13px }
</style>
</head>
<body>
<div id="container">
<div id="a"><a id="click" href="#">A</a></div>
<div id="tC">TC</div>
<div id="b">
<div id="title">BBBB BBBB BBBBB BBBBB BBBBBBBBBBB BBBBBBBBBB BBBBBBBBBBBBBB</div>
<div id="bottom">words at the bottom of blue div!</div>
</div>
</div>
</body>
</html>
Run codeHide resultPress A to toggle the red div - this may not work at lower resolutions.
Demo on JS Bin .
Attempt 2
$('#a').click(function() {
$('#tC').animate({width: 'toggle'});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!DOCTYPE html>
<html>
<head>
<script class="jsbin" src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<meta charset=utf-8 />
<title>JS Bin</title>
<style>
article, aside, figure, footer, header, hgroup,
menu, nav, section { display: block; }
#container { min-width: 900px; width: 98%; margin: 0 2%; float: left; border: 1px solid #000; height: 145px; overflow: hidden;}
#a, #b, #tC { padding: 20px; font-size: 30px; height: 145px }
#a { background: #0C0; width: 100px; float: left; }
#tC { background: #C00; width: 400px; float: left; margin-right: 20px; }
#b { background: #00C; height: 145px; float: left; position: relative }
#bottom { position: absolute; bottom: 44px; font-size: 13px }
</style>
</head>
<body>
<div id="container">
<div id="a"><a id="click" href="#">A</a></div>
<div id="tC">TC</div>
<div id="b">
<div id="title">BBBB BBBB BBBBB BBBBB </div>
<div id="bottom">words at the bottom of blue div!</div>
</div>
</div>
</body>
</html>
Run codeHide resultPress A to toggle the red div.
Demo on JS Bin .
Problems
div . div "" , div .
" " div , , .