css - stick divs to a central div that has left absolute position -
is there way stick div (#diva) div (#divb) has left absolute position in pure css without javascript?
for example:
#divb { position: absolute; left: 100px; }
i want #diva attached left side of #divb,
if dynamically increase #divb left...
update: final objective manage position of others divs,
basing on position of div in middle (div b in picture)
staying sticked on it:
img http://www.sumoware.com/images/temp/xzpsxdkdnccotgoe.png
just use absolute positioning offsets of 100%
stick sides of originator.
html:
<div id="a"> <div id="b"> </div> <div id="c"> </div> </div>
css:
div { position:absolute; height:50px; width:50px; } #a { left:100px; background:red; } #b { right:100%; background:blue; } #c { background:green; left:100%; }
Comments
Post a Comment