Special dynamic positioning in CSS Posted February 19, 2013 · Edited February 19, 2013 by Terenéus Possible with CSS/JS?? WITHOUT jQuery !!! Hi, I need a technique to have a special position of elements inside of scrolling elements. For instance: many words ordered alphabetically in a scrollable container beside the list appears the actual First Letter at the top level of the first word with this letter ...but max. at top of the scrollable box scrolling by user moves the next First Letter closer to the previous one and pushes it sometime out of the box WITHOUT jQuery !!! Thanks for your help. My base code: (without the needed functionality) <!DOCTYPE html><html><head> <meta charset="utf-8" /> <title>Mover</title> <style> body > div { width:200px; height:300px; overflow-y:scroll; border:1px solid red; } body > div > ul > li > div { float:left; width:50px; height:50px; background:#69c; } body > div > ul > li > p { margin-left:60px; } </style></head> <body> <div> <ul> <li> <div>A</div> <p>Anton</p><p>Anton</p><p>Anton</p><p>Anton</p><p>Anton</p><p>Anton</p> </li> <li> <div>B</div> <p>Berta</p><p>Berta</p><p>Berta</p><p>Berta</p><p>Berta</p><p>Berta</p><p>Berta</p><p>Berta</p><p>Berta</p><p>Berta</p><p>Berta</p><p>Berta</p><p>Berta</p><p>Berta</p><p>Berta</p> </li> <li> <div>C</div> <p>Clara</p><p>Clara</p><p>Clara</p><p>Clara</p><p>Clara</p><p>Clara</p><p>Clara</p><p>Clara</p><p>Clara</p> </li> </ul> </div></body></html>
Special dynamic positioning
in CSS
Posted · Edited by Terenéus
Possible with CSS/JS?? WITHOUT jQuery !!! Hi, I need a technique to have a special position of elements inside of scrolling elements. For instance:
WITHOUT jQuery !!! Thanks for your help. My base code: (without the needed functionality)