How to make the Bing Map Autosuggest popup to be same width as the associated textbox?












1















In this sample, as you start typing into the textbox, a list of auto suggestions appears. I would like the width of this AutoSuggest popup to be as wide as the textbox.



But it seems that the AutoSuggest popup is set to be a certain width with no way to override it. I've tried setting the width css attribute, but it looks like the object is destroyed and rebuilt every time it pops up (or so it seems to me).



Is there a way to override the width of the AutoSuggest popup?










share|improve this question



























    1















    In this sample, as you start typing into the textbox, a list of auto suggestions appears. I would like the width of this AutoSuggest popup to be as wide as the textbox.



    But it seems that the AutoSuggest popup is set to be a certain width with no way to override it. I've tried setting the width css attribute, but it looks like the object is destroyed and rebuilt every time it pops up (or so it seems to me).



    Is there a way to override the width of the AutoSuggest popup?










    share|improve this question

























      1












      1








      1








      In this sample, as you start typing into the textbox, a list of auto suggestions appears. I would like the width of this AutoSuggest popup to be as wide as the textbox.



      But it seems that the AutoSuggest popup is set to be a certain width with no way to override it. I've tried setting the width css attribute, but it looks like the object is destroyed and rebuilt every time it pops up (or so it seems to me).



      Is there a way to override the width of the AutoSuggest popup?










      share|improve this question














      In this sample, as you start typing into the textbox, a list of auto suggestions appears. I would like the width of this AutoSuggest popup to be as wide as the textbox.



      But it seems that the AutoSuggest popup is set to be a certain width with no way to override it. I've tried setting the width css attribute, but it looks like the object is destroyed and rebuilt every time it pops up (or so it seems to me).



      Is there a way to override the width of the AutoSuggest popup?







      css bing-maps






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Sep 22 '17 at 22:17









      AngryHackerAngryHacker

      27.8k76242451




      27.8k76242451
























          2 Answers
          2






          active

          oldest

          votes


















          1














          Paste it in your CSS and set the width as per your requirement



          div#as_container {
          max-width: 320px;
          }





          share|improve this answer


























          • Doesn't really work, but you gave me an idea. .typeahead.dropdown-menu { width: 700px; } That did work.

            – AngryHacker
            Jan 2 at 4:03



















          1














          as a last resort you can listen onChange and 'correct' the width after each key press.






          share|improve this answer























            Your Answer






            StackExchange.ifUsing("editor", function () {
            StackExchange.using("externalEditor", function () {
            StackExchange.using("snippets", function () {
            StackExchange.snippets.init();
            });
            });
            }, "code-snippets");

            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "1"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: true,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: 10,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46373954%2fhow-to-make-the-bing-map-autosuggest-popup-to-be-same-width-as-the-associated-te%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            1














            Paste it in your CSS and set the width as per your requirement



            div#as_container {
            max-width: 320px;
            }





            share|improve this answer


























            • Doesn't really work, but you gave me an idea. .typeahead.dropdown-menu { width: 700px; } That did work.

              – AngryHacker
              Jan 2 at 4:03
















            1














            Paste it in your CSS and set the width as per your requirement



            div#as_container {
            max-width: 320px;
            }





            share|improve this answer


























            • Doesn't really work, but you gave me an idea. .typeahead.dropdown-menu { width: 700px; } That did work.

              – AngryHacker
              Jan 2 at 4:03














            1












            1








            1







            Paste it in your CSS and set the width as per your requirement



            div#as_container {
            max-width: 320px;
            }





            share|improve this answer















            Paste it in your CSS and set the width as per your requirement



            div#as_container {
            max-width: 320px;
            }






            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 2 at 4:37









            Alvaro Castro

            5351319




            5351319










            answered Jan 1 at 16:18









            Harish KohliHarish Kohli

            287




            287













            • Doesn't really work, but you gave me an idea. .typeahead.dropdown-menu { width: 700px; } That did work.

              – AngryHacker
              Jan 2 at 4:03



















            • Doesn't really work, but you gave me an idea. .typeahead.dropdown-menu { width: 700px; } That did work.

              – AngryHacker
              Jan 2 at 4:03

















            Doesn't really work, but you gave me an idea. .typeahead.dropdown-menu { width: 700px; } That did work.

            – AngryHacker
            Jan 2 at 4:03





            Doesn't really work, but you gave me an idea. .typeahead.dropdown-menu { width: 700px; } That did work.

            – AngryHacker
            Jan 2 at 4:03













            1














            as a last resort you can listen onChange and 'correct' the width after each key press.






            share|improve this answer




























              1














              as a last resort you can listen onChange and 'correct' the width after each key press.






              share|improve this answer


























                1












                1








                1







                as a last resort you can listen onChange and 'correct' the width after each key press.






                share|improve this answer













                as a last resort you can listen onChange and 'correct' the width after each key press.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Sep 22 '17 at 22:39









                Anona112Anona112

                1,94521228




                1,94521228






























                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Stack Overflow!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f46373954%2fhow-to-make-the-bing-map-autosuggest-popup-to-be-same-width-as-the-associated-te%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    MongoDB - Not Authorized To Execute Command

                    in spring boot 2.1 many test slices are not allowed anymore due to multiple @BootstrapWith

                    How to fix TextFormField cause rebuild widget in Flutter