Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 247367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T21:15:12+00:00 2026-05-11T21:15:12+00:00

I am using the AJAX autocomplete add-on to the <asp:textbox> control. I have everything

  • 0

I am using the AJAX autocomplete add-on to the <asp:textbox> control. I have everything working with a <div> around the <ajaxToolkit:AutoCompleteExtender>.

I set the following CSS class:

.autocomplete_CompletionListElement
{
    margin: 0px;
    background-color: White;
    cursor: default;
    overflow-y: auto;
    overflow-x: hidden;
    height:180px;
    text-align: left;
    border: 1px solid #777;
    z-index:10000;
}

Right now, when the list contains a reasonable amount of items, a vertical scrollbar appears (which is correct) and I can scroll through the drop down which is set to a height of 180px in the CSS (as seen above).

However, when there are only 1 or 2 items in the drop down, the height remains fixed at 180px with the 2 items and blank white space below. What I would ideally want is that the AJAX drop down would shrink to fit the height of its contents. If the contents are more than 180px, then the scrollbar should appear (as it is doing now).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T21:15:12+00:00Added an answer on May 11, 2026 at 9:15 pm

    Remove height:180px and change the CSS to use something like:

    max-height:180px;
    

    That should work (but I think only from IE7+) the other browsers should support it ok.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm using jquery autocomplete <script src='http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js'></script> <script src='http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js'></script> Everything is working Ok., but now
I'm using the MS AJAX AutoCompleteExtender on a textbox. It's working fine, except when
I am using Ajax tab container control with 3 tabs. I have placed a
i am using jquery ui autocomplete in my tag textbox , its working fine
i am using JQuery UI Autocomplete with asp.net textbox. AutoComplete works right. but how
I have an Ajax autocomplete extender, and it is working fine. However, I want
I have implemented the Ajax Autocomplete feature in my application using a web service
I have an AutoCompleteExtender from the Ajax Control Toolkit. I need to have a
Question: Is there any reason Autocomplete=off on a ASP:Textbox would not be working in
I'm using Tagify , which is basically using jQuery Autocomplete, references : <script src=http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js></script>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.