How to place a scroll bar for the buttons piled up vertically?












0















I am working on a website in which I want to place a scroll bar for the buttons piled up vertically.



Here is the fiddle for it.



The html code which I have used in order to make one single button is:



<div class="btn-group dropup">
<button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
Dropup
</button>
<div class="dropdown-menu">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="#">Separated link</a>
<div class="dropdown-divider"></div>
</div>
</div>





Problem Statement:



I am wondering how I can placed all the buttons inside the scrollbar. This is what I have tried but it doesn't seem to work.



.dropdowns
{
height: 200px;
overflow-y: auto;
}


I am following this tutorial in order to make it work.










share|improve this question





























    0















    I am working on a website in which I want to place a scroll bar for the buttons piled up vertically.



    Here is the fiddle for it.



    The html code which I have used in order to make one single button is:



    <div class="btn-group dropup">
    <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
    Dropup
    </button>
    <div class="dropdown-menu">
    <a class="dropdown-item" href="#">Action</a>
    <a class="dropdown-item" href="#">Another action</a>
    <a class="dropdown-item" href="#">Something else here</a>
    <div class="dropdown-divider"></div>
    <a class="dropdown-item" href="#">Separated link</a>
    <div class="dropdown-divider"></div>
    </div>
    </div>





    Problem Statement:



    I am wondering how I can placed all the buttons inside the scrollbar. This is what I have tried but it doesn't seem to work.



    .dropdowns
    {
    height: 200px;
    overflow-y: auto;
    }


    I am following this tutorial in order to make it work.










    share|improve this question



























      0












      0








      0








      I am working on a website in which I want to place a scroll bar for the buttons piled up vertically.



      Here is the fiddle for it.



      The html code which I have used in order to make one single button is:



      <div class="btn-group dropup">
      <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
      Dropup
      </button>
      <div class="dropdown-menu">
      <a class="dropdown-item" href="#">Action</a>
      <a class="dropdown-item" href="#">Another action</a>
      <a class="dropdown-item" href="#">Something else here</a>
      <div class="dropdown-divider"></div>
      <a class="dropdown-item" href="#">Separated link</a>
      <div class="dropdown-divider"></div>
      </div>
      </div>





      Problem Statement:



      I am wondering how I can placed all the buttons inside the scrollbar. This is what I have tried but it doesn't seem to work.



      .dropdowns
      {
      height: 200px;
      overflow-y: auto;
      }


      I am following this tutorial in order to make it work.










      share|improve this question
















      I am working on a website in which I want to place a scroll bar for the buttons piled up vertically.



      Here is the fiddle for it.



      The html code which I have used in order to make one single button is:



      <div class="btn-group dropup">
      <button type="button" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
      Dropup
      </button>
      <div class="dropdown-menu">
      <a class="dropdown-item" href="#">Action</a>
      <a class="dropdown-item" href="#">Another action</a>
      <a class="dropdown-item" href="#">Something else here</a>
      <div class="dropdown-divider"></div>
      <a class="dropdown-item" href="#">Separated link</a>
      <div class="dropdown-divider"></div>
      </div>
      </div>





      Problem Statement:



      I am wondering how I can placed all the buttons inside the scrollbar. This is what I have tried but it doesn't seem to work.



      .dropdowns
      {
      height: 200px;
      overflow-y: auto;
      }


      I am following this tutorial in order to make it work.







      html css overflow






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 20 '18 at 19:35







      john

















      asked Nov 20 '18 at 18:19









      johnjohn

      1,9871771156




      1,9871771156
























          2 Answers
          2






          active

          oldest

          votes


















          0














          <div>
          <button>btn1</button>
          <button>btn2</button>
          <button>btn3</button>
          <button>btn4</button>
          </div>

          <style>
          div {
          overflow-y: auto;
          width: 100%;
          }
          button {
          display: inline-block;
          padding: 5px 10px;
          border: 1px solid lightblue;
          border-radius: 5px;
          }
          </style>


          Above code should work. You can add any bootstrap classes you want for custom look and feel.






          share|improve this answer
























          • can you update it in the fiddle ? In that way, it would be more to easy to visualize.

            – john
            Nov 20 '18 at 18:49



















          0














          here is the fiddle for it






          <div>
          <button>Button</button>
          <button>Button</button>
          <button>Button</button>
          <button>Button</button>
          <button>Button</button>
          <button>Button</button>
          <button>Button</button>
          <button>Button</button>
          </div>

          <style>
          div {
          overflow-y: auto;
          width: 100px;
          height:100px;
          }
          button {
          margin:5px;
          display: inline-block;
          padding: 5px 10px;
          background:green;
          color:white;
          border-radius: 5px;
          }
          </style>








          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%2f53399163%2fhow-to-place-a-scroll-bar-for-the-buttons-piled-up-vertically%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









            0














            <div>
            <button>btn1</button>
            <button>btn2</button>
            <button>btn3</button>
            <button>btn4</button>
            </div>

            <style>
            div {
            overflow-y: auto;
            width: 100%;
            }
            button {
            display: inline-block;
            padding: 5px 10px;
            border: 1px solid lightblue;
            border-radius: 5px;
            }
            </style>


            Above code should work. You can add any bootstrap classes you want for custom look and feel.






            share|improve this answer
























            • can you update it in the fiddle ? In that way, it would be more to easy to visualize.

              – john
              Nov 20 '18 at 18:49
















            0














            <div>
            <button>btn1</button>
            <button>btn2</button>
            <button>btn3</button>
            <button>btn4</button>
            </div>

            <style>
            div {
            overflow-y: auto;
            width: 100%;
            }
            button {
            display: inline-block;
            padding: 5px 10px;
            border: 1px solid lightblue;
            border-radius: 5px;
            }
            </style>


            Above code should work. You can add any bootstrap classes you want for custom look and feel.






            share|improve this answer
























            • can you update it in the fiddle ? In that way, it would be more to easy to visualize.

              – john
              Nov 20 '18 at 18:49














            0












            0








            0







            <div>
            <button>btn1</button>
            <button>btn2</button>
            <button>btn3</button>
            <button>btn4</button>
            </div>

            <style>
            div {
            overflow-y: auto;
            width: 100%;
            }
            button {
            display: inline-block;
            padding: 5px 10px;
            border: 1px solid lightblue;
            border-radius: 5px;
            }
            </style>


            Above code should work. You can add any bootstrap classes you want for custom look and feel.






            share|improve this answer













            <div>
            <button>btn1</button>
            <button>btn2</button>
            <button>btn3</button>
            <button>btn4</button>
            </div>

            <style>
            div {
            overflow-y: auto;
            width: 100%;
            }
            button {
            display: inline-block;
            padding: 5px 10px;
            border: 1px solid lightblue;
            border-radius: 5px;
            }
            </style>


            Above code should work. You can add any bootstrap classes you want for custom look and feel.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Nov 20 '18 at 18:48









            Surajit DasSurajit Das

            13




            13













            • can you update it in the fiddle ? In that way, it would be more to easy to visualize.

              – john
              Nov 20 '18 at 18:49



















            • can you update it in the fiddle ? In that way, it would be more to easy to visualize.

              – john
              Nov 20 '18 at 18:49

















            can you update it in the fiddle ? In that way, it would be more to easy to visualize.

            – john
            Nov 20 '18 at 18:49





            can you update it in the fiddle ? In that way, it would be more to easy to visualize.

            – john
            Nov 20 '18 at 18:49













            0














            here is the fiddle for it






            <div>
            <button>Button</button>
            <button>Button</button>
            <button>Button</button>
            <button>Button</button>
            <button>Button</button>
            <button>Button</button>
            <button>Button</button>
            <button>Button</button>
            </div>

            <style>
            div {
            overflow-y: auto;
            width: 100px;
            height:100px;
            }
            button {
            margin:5px;
            display: inline-block;
            padding: 5px 10px;
            background:green;
            color:white;
            border-radius: 5px;
            }
            </style>








            share|improve this answer




























              0














              here is the fiddle for it






              <div>
              <button>Button</button>
              <button>Button</button>
              <button>Button</button>
              <button>Button</button>
              <button>Button</button>
              <button>Button</button>
              <button>Button</button>
              <button>Button</button>
              </div>

              <style>
              div {
              overflow-y: auto;
              width: 100px;
              height:100px;
              }
              button {
              margin:5px;
              display: inline-block;
              padding: 5px 10px;
              background:green;
              color:white;
              border-radius: 5px;
              }
              </style>








              share|improve this answer


























                0












                0








                0







                here is the fiddle for it






                <div>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                </div>

                <style>
                div {
                overflow-y: auto;
                width: 100px;
                height:100px;
                }
                button {
                margin:5px;
                display: inline-block;
                padding: 5px 10px;
                background:green;
                color:white;
                border-radius: 5px;
                }
                </style>








                share|improve this answer













                here is the fiddle for it






                <div>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                </div>

                <style>
                div {
                overflow-y: auto;
                width: 100px;
                height:100px;
                }
                button {
                margin:5px;
                display: inline-block;
                padding: 5px 10px;
                background:green;
                color:white;
                border-radius: 5px;
                }
                </style>








                <div>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                </div>

                <style>
                div {
                overflow-y: auto;
                width: 100px;
                height:100px;
                }
                button {
                margin:5px;
                display: inline-block;
                padding: 5px 10px;
                background:green;
                color:white;
                border-radius: 5px;
                }
                </style>





                <div>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                <button>Button</button>
                </div>

                <style>
                div {
                overflow-y: auto;
                width: 100px;
                height:100px;
                }
                button {
                margin:5px;
                display: inline-block;
                padding: 5px 10px;
                background:green;
                color:white;
                border-radius: 5px;
                }
                </style>






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Nov 21 '18 at 8:04









                Yash SoniYash Soni

                48510




                48510






























                    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%2f53399163%2fhow-to-place-a-scroll-bar-for-the-buttons-piled-up-vertically%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







                    這個網誌中的熱門文章

                    Tangent Lines Diagram Along Smooth Curve

                    Yusuf al-Mu'taman ibn Hud

                    Zucchini