CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 YUI Autocomplete dropdown width

Print topic Send  topic

Author Message
bobsmith

Posts: 3
Posted: 01/19/2010, 9:48 PM

Hi all,

We have dotted a few YUI autocomplete features through our application and initially I believed that the width of the dropdown container needed to be set explicitly using CSS to prevent it being a tiny width and therefore squeezing up the contents.

However, I have noticed that sometimes, the dropdown container will nicely autosize to the width of the contents.

I get different behaviour displaying the same contents on different pages and I can't spot the pattern.

I would like to ensure it simply autosizes everywhere and avoid fiddling with explicit pixel widths. Does anyone know how I can achieve this?

Thanks in advance
View profile  Send private message
bobsmith

Posts: 3
Posted: 01/24/2010, 9:07 PM

After much frustrating troubleshooting I finally seem to have resolved this. I thought I would post my findings here like a good citizen in the hope that I might save someone else from the same difficulties.

Basically - the YUI autocomplete renders its dropdown inside a DIV tag, which seems to inherit styles from its container(s) in ways which I can't claim to understand fully. In my case, the input box happened to be in a table that had align="center" set. If I removed this, the dropdown list stopped wrapping.

I then found that I could edit my main CSS file and use CSS to override the YUI class to force no-wrap as follows:

.yui-ac-content {
white-space: nowrap
}

With this in place, the dropdown list appears to avoid wrapping in all circumstances where it was previously and therefore my problem is solved.

Bob
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.