How to place a scroll bar for the buttons piled up vertically?
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
add a comment |
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
add a comment |
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
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
html css overflow
edited Nov 20 at 19:35
asked Nov 20 at 18:19
john
1,8721667150
1,8721667150
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
<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.
can you update it in the fiddle ? In that way, it would be more to easy to visualize.
– john
Nov 20 at 18:49
add a comment |
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>
add a comment |
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
<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.
can you update it in the fiddle ? In that way, it would be more to easy to visualize.
– john
Nov 20 at 18:49
add a comment |
<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.
can you update it in the fiddle ? In that way, it would be more to easy to visualize.
– john
Nov 20 at 18:49
add a comment |
<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.
<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.
answered Nov 20 at 18:48
Surajit Das
13
13
can you update it in the fiddle ? In that way, it would be more to easy to visualize.
– john
Nov 20 at 18:49
add a comment |
can you update it in the fiddle ? In that way, it would be more to easy to visualize.
– john
Nov 20 at 18:49
can you update it in the fiddle ? In that way, it would be more to easy to visualize.
– john
Nov 20 at 18:49
can you update it in the fiddle ? In that way, it would be more to easy to visualize.
– john
Nov 20 at 18:49
add a comment |
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>
add a comment |
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>
add a comment |
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>
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>
answered Nov 21 at 8:04
Yash Soni
47510
47510
add a comment |
add a comment |
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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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