In my div that has a width of 200px, I have text inside that is set to not wrap. This causes overflow within the div. My goal is to determine the total width of the content within the div, taking into account any overflow present.
I am currently working on creating a YUI autocomplete dropdown menu. To ensure a seamless user experience, I want the dropdown to expand horizontally if the width of a search result exceeds the width of the div.
Is there a way for me to accurately calculate the width of the content inside the div, disregarding the CSS-defined width? The typical method using offsetWidth does not seem to be effective in this scenario.