I've spent the last few days searching for a viable solution to this particular dilemma.
Basically, I have a div that requires a secondary scroll bar at the top in order to facilitate horizontal scrolling without having to navigate all the way to the bottom.
The content within this div is extremely diverse. My goal is to accurately determine its true width so that I can synchronize it with the dummy scroll bar div linked to it.
This content is retrieved via an AJAX request. One approach I tried was to include a div/p element with an auto width, returned along with the data by the AJAX call. This would serve as a single reference point to acquire the width from and apply it to the second div. However, the issue arises when the div/p tag only covers the visible portion of the content div upon return (tested using borders). Ideally, it should span the entire content div.
Are there any effective solutions out there for implementing secondary scroll bars with variable-width content? Suggestions involving JQuery or Javascript are appreciated.