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 7953055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T03:02:59+00:00 2026-06-04T03:02:59+00:00

I found a great plug-in for doing Auto-Complete with Javascript called AutoSuggest thanks to

  • 0

I found a great plug-in for doing Auto-Complete with Javascript called AutoSuggest thanks to this Stack Overflow post:

plugin to separate tags (like the stackoverflow's input tags interface)

Here is the link to the plug-in author’s page:

http://code.drewwilson.com/entry/autosuggest-jquery-plugin

The autoSuggest plug-in is setting the width of the input box (type=”text”) for entering queries to 1000px, much wider than I want. It is somehow overridding the width set in the input box style property in the document HTML:

<div NAME="divAutoSuggest" ID="divAutoSuggest">
        <input type="text" NAME="editQuery2" ID="editQuery2" wrap="soft" style="margin-left:5px;width:600px;" title="Enter your search query here using plain English"></input>
</div>

I also tried using the cols attribute in the input box definition but that was ignored too. I found this other Stack Overflow post that talked about intercepting the width setting during the open event, but the example was for the autocomplete plug-in and not autoSuggest:

Changing width of jquery-ui autocomplete widgets individually

I tried it anyways using this code:

$(document).ready
(
function() 
{
    // Put jQuery related initialization code that must occur after the document is ready here.

    $("input[type=text]").autoSuggest
    (
        data.items, 
        {
            selectedItemProp: "name", 
            searchObjProps: "name",
            startText: "Enter Evernote tags here...",
            open: function(event, ui) 
            {
                $(this).autoSuggest("widget").css
                (
                    {
                        "width": 600
                    }
                );
            }
        } // data. items
    ); // $("input[type=text]").autoSuggest
} // function() 
); // $(document).ready

But that did not work either. can anyone tell me how to set the width of the input box? Note I am not talking about the drop-down box with the auto-complete entries, I am referring to the primary input area where you type the text that triggers the auto-complete drop-down box.

  • 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-06-04T03:03:00+00:00Added an answer on June 4, 2026 at 3:03 am

    To set the width for the AutoSuggest jQuery Plugin, you need to search for ul.as-selections in the CSS that came with it and define your width:

    CSS

    ul.as-selections {
      ...
      width: 400px; // define your width
      ...
    }
    

    If you haven’t changed the original CSS, It’s like this:

    CSS ORIGINAL DECLARATIONS for ul.as-selections

    ul.as-selections {
     list-style-type: none;
      border-top: 1px solid #888;
      border-bottom: 1px solid #b6b6b6;
      border-left: 1px solid #aaa;
      border-right: 1px solid #aaa;
      padding: 4px 0 4px 4px;
      margin: 0;
      overflow: auto;
      background-color: #fff;
      box-shadow:inset 0 1px 2px #888;
      -webkit-box-shadow:inset 0 1px 2px #888;
      -moz-box-shadow:inset 0 1px 2px #888;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I found this great post on creating a progress bar with javascript: Show javascript
I found this great Tablesorter plugin for jQuery but I can't make it work
I found this great post by @hugoware about parsing values: http://hugoware.net/blog/more-control-when-parsing-values . I re-used
I found great examples of what Im looking for here : http://hugoduncan.org/post/2010/shell_scripting_in_clojure_with_pallet.xhtml But seems
I have just found this great tutorial as it is something that I need.
I found some great help on this site that helped me tile an image
Ok found some great code on Stack. Have adapted it slightly. But in essence
I found this great jQuery slideshow: http://slidesjs.com/examples/images-with-captions/ However, I'd like it so the caption
I haven't really found a great way to do this yet, so I figured
I found this great tip via Google, and I am well familiar with the

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.