overflow scroll-y not working with flexboxCan't get vertical scrollbar with justify-content: flex-endHow do CSS triangles work?Flexbox and vertical scroll in a full-height app using NEWER flexbox apiFlexbox: center horizontally and verticallyBetter way to set distance between flexbox itemsFlexbox: scrolling flexchild between two other flexchildren on content overflowHow to put scrollbar only for modal-body in bootstrap modal dialogIn CSS Flexbox, why are there no “justify-items” and “justify-self” properties?CSS position:fixed is working for the header but not for the footerclip-path polygon with curve edgesAutoresize css tooltip
Redundant comparison & "if" before assignment
How can "mimic phobia" be cured or prevented?
What should you do when eye contact makes your subordinate uncomfortable?
How to hide some fields of struct in C?
Has any country ever had 2 former presidents in jail simultaneously?
The probability of Bus A arriving before Bus B
A social experiment. What is the worst that can happen?
How can I write humor as character trait?
Why should universal income be universal?
What is going on with 'gets(stdin)' on the site coderbyte?
What should you do if you miss a job interview (deliberately)?
Using substitution ciphers to generate new alphabets in a novel
Is there a RAID 0 Equivalent for RAM?
Why Shazam when there is already Superman?
Can a stoichiometric mixture of oxygen and methane exist as a liquid at standard pressure and some (low) temperature?
Why did the EU agree to delay the Brexit deadline?
Is there an injective, monotonically increasing, strictly concave function from the reals, to the reals?
Pre-mixing cryogenic fuels and using only one fuel tank
Why is it that I can sometimes guess the next note?
Temporarily disable WLAN internet access for children, but allow it for adults
Mimic lecturing on blackboard, facing audience
How do you make your own symbol when Detexify fails?
What are some good ways to treat frozen vegetables such that they behave like fresh vegetables when stir frying them?
Can a College of Swords bard use a Blade Flourish option on an opportunity attack provoked by their own Dissonant Whispers spell?
overflow scroll-y not working with flexbox
Can't get vertical scrollbar with justify-content: flex-endHow do CSS triangles work?Flexbox and vertical scroll in a full-height app using NEWER flexbox apiFlexbox: center horizontally and verticallyBetter way to set distance between flexbox itemsFlexbox: scrolling flexchild between two other flexchildren on content overflowHow to put scrollbar only for modal-body in bootstrap modal dialogIn CSS Flexbox, why are there no “justify-items” and “justify-self” properties?CSS position:fixed is working for the header but not for the footerclip-path polygon with curve edgesAutoresize css tooltip
I'm trying to "stack" divs on top of each other as new div boxes (.dialog-box
) are added to the parent container (.dialog-container
).
To stack the elements, I'm using the following on the parent:
display: flex;
flex-direction: column;
justify-content: flex-end;
I'd like to scroll that container for .dialog-box
s that are overflowing, yet with flex-box the overflow-y: scroll;
is not scrolling.
Two boxes: (fill up container from bottom to top as expected):
Six boxes (expands outside the height of the container and should scroll):
SCSS:
.dialog-container
border: 4px solid rgba(255, 255, 255, .4);
border-radius: 5px;
width: 300px;
height: 340px;
position: relative;
top: -50px;
margin: 0 auto;
overflow-y: scroll;
z-index: 5;
display: flex;
flex-direction: column;
justify-content: flex-end;
.dialog-box
width: 90%;
background: $dialogBoxWhite;
margin-bottom: 20px;
border-radius: 8px;
border: 5px solid $dialogBoxGreenBorder;
color: $dialogBoxGreenFont;
text-align: center;
margin-left: 5px;
padding: 5px;
display: inline-block;
p
HTML:
<div class="dialog-container">
<div class="dialog-box"></div>
<div class="dialog-box"></div>
<div class="dialog-box"></div>
<div class="dialog-box"></div>
<div class="dialog-box"></div>
<div class="dialog-box"></div>
</div>
html css css3 flexbox
add a comment |
I'm trying to "stack" divs on top of each other as new div boxes (.dialog-box
) are added to the parent container (.dialog-container
).
To stack the elements, I'm using the following on the parent:
display: flex;
flex-direction: column;
justify-content: flex-end;
I'd like to scroll that container for .dialog-box
s that are overflowing, yet with flex-box the overflow-y: scroll;
is not scrolling.
Two boxes: (fill up container from bottom to top as expected):
Six boxes (expands outside the height of the container and should scroll):
SCSS:
.dialog-container
border: 4px solid rgba(255, 255, 255, .4);
border-radius: 5px;
width: 300px;
height: 340px;
position: relative;
top: -50px;
margin: 0 auto;
overflow-y: scroll;
z-index: 5;
display: flex;
flex-direction: column;
justify-content: flex-end;
.dialog-box
width: 90%;
background: $dialogBoxWhite;
margin-bottom: 20px;
border-radius: 8px;
border: 5px solid $dialogBoxGreenBorder;
color: $dialogBoxGreenFont;
text-align: center;
margin-left: 5px;
padding: 5px;
display: inline-block;
p
HTML:
<div class="dialog-container">
<div class="dialog-box"></div>
<div class="dialog-box"></div>
<div class="dialog-box"></div>
<div class="dialog-box"></div>
<div class="dialog-box"></div>
<div class="dialog-box"></div>
</div>
html css css3 flexbox
Can't get vertical scrollbar withjustify-content: flex-end
– Michael_B
Mar 27 '18 at 15:35
add a comment |
I'm trying to "stack" divs on top of each other as new div boxes (.dialog-box
) are added to the parent container (.dialog-container
).
To stack the elements, I'm using the following on the parent:
display: flex;
flex-direction: column;
justify-content: flex-end;
I'd like to scroll that container for .dialog-box
s that are overflowing, yet with flex-box the overflow-y: scroll;
is not scrolling.
Two boxes: (fill up container from bottom to top as expected):
Six boxes (expands outside the height of the container and should scroll):
SCSS:
.dialog-container
border: 4px solid rgba(255, 255, 255, .4);
border-radius: 5px;
width: 300px;
height: 340px;
position: relative;
top: -50px;
margin: 0 auto;
overflow-y: scroll;
z-index: 5;
display: flex;
flex-direction: column;
justify-content: flex-end;
.dialog-box
width: 90%;
background: $dialogBoxWhite;
margin-bottom: 20px;
border-radius: 8px;
border: 5px solid $dialogBoxGreenBorder;
color: $dialogBoxGreenFont;
text-align: center;
margin-left: 5px;
padding: 5px;
display: inline-block;
p
HTML:
<div class="dialog-container">
<div class="dialog-box"></div>
<div class="dialog-box"></div>
<div class="dialog-box"></div>
<div class="dialog-box"></div>
<div class="dialog-box"></div>
<div class="dialog-box"></div>
</div>
html css css3 flexbox
I'm trying to "stack" divs on top of each other as new div boxes (.dialog-box
) are added to the parent container (.dialog-container
).
To stack the elements, I'm using the following on the parent:
display: flex;
flex-direction: column;
justify-content: flex-end;
I'd like to scroll that container for .dialog-box
s that are overflowing, yet with flex-box the overflow-y: scroll;
is not scrolling.
Two boxes: (fill up container from bottom to top as expected):
Six boxes (expands outside the height of the container and should scroll):
SCSS:
.dialog-container
border: 4px solid rgba(255, 255, 255, .4);
border-radius: 5px;
width: 300px;
height: 340px;
position: relative;
top: -50px;
margin: 0 auto;
overflow-y: scroll;
z-index: 5;
display: flex;
flex-direction: column;
justify-content: flex-end;
.dialog-box
width: 90%;
background: $dialogBoxWhite;
margin-bottom: 20px;
border-radius: 8px;
border: 5px solid $dialogBoxGreenBorder;
color: $dialogBoxGreenFont;
text-align: center;
margin-left: 5px;
padding: 5px;
display: inline-block;
p
HTML:
<div class="dialog-container">
<div class="dialog-box"></div>
<div class="dialog-box"></div>
<div class="dialog-box"></div>
<div class="dialog-box"></div>
<div class="dialog-box"></div>
<div class="dialog-box"></div>
</div>
html css css3 flexbox
html css css3 flexbox
edited Mar 27 '18 at 15:29
Michael_B
156k50254362
156k50254362
asked Mar 27 '18 at 3:01
GrowlerGrowler
4,8681267159
4,8681267159
Can't get vertical scrollbar withjustify-content: flex-end
– Michael_B
Mar 27 '18 at 15:35
add a comment |
Can't get vertical scrollbar withjustify-content: flex-end
– Michael_B
Mar 27 '18 at 15:35
Can't get vertical scrollbar with
justify-content: flex-end
– Michael_B
Mar 27 '18 at 15:35
Can't get vertical scrollbar with
justify-content: flex-end
– Michael_B
Mar 27 '18 at 15:35
add a comment |
2 Answers
2
active
oldest
votes
update answer, I confused a value of flex-direction.
'row' is right not 'column'
add css in .dialog-container
flex-direction: row;
flex-wrap : wrap;
or
flex-flow: row wrap
add a comment |
Try to change display: flex;
to display: flex-box;
This will give you a scroll bar that actually scrolls. Additionally, your examples divs are all lacking closing tags.
https://jsfiddle.net/Lpw0726j/23/
<div class="dialog-container">
<div class="dialog-box">9</div>
<div class="dialog-box">8</div>
<div class="dialog-box">7</div>
<div class="dialog-box">6</div>
<div class="dialog-box">5</div>
<div class="dialog-box">4</div>
<div class="dialog-box">3</div>
<div class="dialog-box">2</div>
<div class="dialog-box">1</div>
</div>
.dialog-container
border: 4px solid rgba(255, 255, 255, .4);
border-radius: 5px;
width: 300px;
height: 340px;
position: relative;
top: 50px;
margin: 0 auto;
z-index: 5;
display: flex-box;
flex-direction: column;
justify-content: flex-end;
overflow-y: auto;
background-color: teal;
.dialog-box
width: 90%;
background: black;
margin-bottom: 20px;
border-radius: 8px;
border: 5px solid red;
color: green;
text-align: center;
margin-left: 5px;
padding: 5px;
display: inline-block;
p
2
display: flex-box
was renamed todisplay: flex
years ago.
– jhpratt
Mar 27 '18 at 4:18
1
Switching fromdisplay: flex
todisplay: flex-box
solves the problem only becausedisplay: flex-box
is completely invalid code, so the container falls back to its default setting:display: block
.
– Michael_B
Mar 27 '18 at 15:31
The actual problem is discussed here: stackoverflow.com/a/41864390/3597276
– Michael_B
Mar 27 '18 at 15:37
display: flex
still removes the scroll bar
– Growler
Mar 31 '18 at 4:33
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%2f49503733%2foverflow-scroll-y-not-working-with-flexbox%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
update answer, I confused a value of flex-direction.
'row' is right not 'column'
add css in .dialog-container
flex-direction: row;
flex-wrap : wrap;
or
flex-flow: row wrap
add a comment |
update answer, I confused a value of flex-direction.
'row' is right not 'column'
add css in .dialog-container
flex-direction: row;
flex-wrap : wrap;
or
flex-flow: row wrap
add a comment |
update answer, I confused a value of flex-direction.
'row' is right not 'column'
add css in .dialog-container
flex-direction: row;
flex-wrap : wrap;
or
flex-flow: row wrap
update answer, I confused a value of flex-direction.
'row' is right not 'column'
add css in .dialog-container
flex-direction: row;
flex-wrap : wrap;
or
flex-flow: row wrap
edited Mar 8 at 2:02
answered Mar 27 '18 at 3:54
ogelacinycogelacinyc
538516
538516
add a comment |
add a comment |
Try to change display: flex;
to display: flex-box;
This will give you a scroll bar that actually scrolls. Additionally, your examples divs are all lacking closing tags.
https://jsfiddle.net/Lpw0726j/23/
<div class="dialog-container">
<div class="dialog-box">9</div>
<div class="dialog-box">8</div>
<div class="dialog-box">7</div>
<div class="dialog-box">6</div>
<div class="dialog-box">5</div>
<div class="dialog-box">4</div>
<div class="dialog-box">3</div>
<div class="dialog-box">2</div>
<div class="dialog-box">1</div>
</div>
.dialog-container
border: 4px solid rgba(255, 255, 255, .4);
border-radius: 5px;
width: 300px;
height: 340px;
position: relative;
top: 50px;
margin: 0 auto;
z-index: 5;
display: flex-box;
flex-direction: column;
justify-content: flex-end;
overflow-y: auto;
background-color: teal;
.dialog-box
width: 90%;
background: black;
margin-bottom: 20px;
border-radius: 8px;
border: 5px solid red;
color: green;
text-align: center;
margin-left: 5px;
padding: 5px;
display: inline-block;
p
2
display: flex-box
was renamed todisplay: flex
years ago.
– jhpratt
Mar 27 '18 at 4:18
1
Switching fromdisplay: flex
todisplay: flex-box
solves the problem only becausedisplay: flex-box
is completely invalid code, so the container falls back to its default setting:display: block
.
– Michael_B
Mar 27 '18 at 15:31
The actual problem is discussed here: stackoverflow.com/a/41864390/3597276
– Michael_B
Mar 27 '18 at 15:37
display: flex
still removes the scroll bar
– Growler
Mar 31 '18 at 4:33
add a comment |
Try to change display: flex;
to display: flex-box;
This will give you a scroll bar that actually scrolls. Additionally, your examples divs are all lacking closing tags.
https://jsfiddle.net/Lpw0726j/23/
<div class="dialog-container">
<div class="dialog-box">9</div>
<div class="dialog-box">8</div>
<div class="dialog-box">7</div>
<div class="dialog-box">6</div>
<div class="dialog-box">5</div>
<div class="dialog-box">4</div>
<div class="dialog-box">3</div>
<div class="dialog-box">2</div>
<div class="dialog-box">1</div>
</div>
.dialog-container
border: 4px solid rgba(255, 255, 255, .4);
border-radius: 5px;
width: 300px;
height: 340px;
position: relative;
top: 50px;
margin: 0 auto;
z-index: 5;
display: flex-box;
flex-direction: column;
justify-content: flex-end;
overflow-y: auto;
background-color: teal;
.dialog-box
width: 90%;
background: black;
margin-bottom: 20px;
border-radius: 8px;
border: 5px solid red;
color: green;
text-align: center;
margin-left: 5px;
padding: 5px;
display: inline-block;
p
2
display: flex-box
was renamed todisplay: flex
years ago.
– jhpratt
Mar 27 '18 at 4:18
1
Switching fromdisplay: flex
todisplay: flex-box
solves the problem only becausedisplay: flex-box
is completely invalid code, so the container falls back to its default setting:display: block
.
– Michael_B
Mar 27 '18 at 15:31
The actual problem is discussed here: stackoverflow.com/a/41864390/3597276
– Michael_B
Mar 27 '18 at 15:37
display: flex
still removes the scroll bar
– Growler
Mar 31 '18 at 4:33
add a comment |
Try to change display: flex;
to display: flex-box;
This will give you a scroll bar that actually scrolls. Additionally, your examples divs are all lacking closing tags.
https://jsfiddle.net/Lpw0726j/23/
<div class="dialog-container">
<div class="dialog-box">9</div>
<div class="dialog-box">8</div>
<div class="dialog-box">7</div>
<div class="dialog-box">6</div>
<div class="dialog-box">5</div>
<div class="dialog-box">4</div>
<div class="dialog-box">3</div>
<div class="dialog-box">2</div>
<div class="dialog-box">1</div>
</div>
.dialog-container
border: 4px solid rgba(255, 255, 255, .4);
border-radius: 5px;
width: 300px;
height: 340px;
position: relative;
top: 50px;
margin: 0 auto;
z-index: 5;
display: flex-box;
flex-direction: column;
justify-content: flex-end;
overflow-y: auto;
background-color: teal;
.dialog-box
width: 90%;
background: black;
margin-bottom: 20px;
border-radius: 8px;
border: 5px solid red;
color: green;
text-align: center;
margin-left: 5px;
padding: 5px;
display: inline-block;
p
Try to change display: flex;
to display: flex-box;
This will give you a scroll bar that actually scrolls. Additionally, your examples divs are all lacking closing tags.
https://jsfiddle.net/Lpw0726j/23/
<div class="dialog-container">
<div class="dialog-box">9</div>
<div class="dialog-box">8</div>
<div class="dialog-box">7</div>
<div class="dialog-box">6</div>
<div class="dialog-box">5</div>
<div class="dialog-box">4</div>
<div class="dialog-box">3</div>
<div class="dialog-box">2</div>
<div class="dialog-box">1</div>
</div>
.dialog-container
border: 4px solid rgba(255, 255, 255, .4);
border-radius: 5px;
width: 300px;
height: 340px;
position: relative;
top: 50px;
margin: 0 auto;
z-index: 5;
display: flex-box;
flex-direction: column;
justify-content: flex-end;
overflow-y: auto;
background-color: teal;
.dialog-box
width: 90%;
background: black;
margin-bottom: 20px;
border-radius: 8px;
border: 5px solid red;
color: green;
text-align: center;
margin-left: 5px;
padding: 5px;
display: inline-block;
p
edited Mar 27 '18 at 4:54
john
1,57052028
1,57052028
answered Mar 27 '18 at 4:07
Jesse DuncanJesse Duncan
12
12
2
display: flex-box
was renamed todisplay: flex
years ago.
– jhpratt
Mar 27 '18 at 4:18
1
Switching fromdisplay: flex
todisplay: flex-box
solves the problem only becausedisplay: flex-box
is completely invalid code, so the container falls back to its default setting:display: block
.
– Michael_B
Mar 27 '18 at 15:31
The actual problem is discussed here: stackoverflow.com/a/41864390/3597276
– Michael_B
Mar 27 '18 at 15:37
display: flex
still removes the scroll bar
– Growler
Mar 31 '18 at 4:33
add a comment |
2
display: flex-box
was renamed todisplay: flex
years ago.
– jhpratt
Mar 27 '18 at 4:18
1
Switching fromdisplay: flex
todisplay: flex-box
solves the problem only becausedisplay: flex-box
is completely invalid code, so the container falls back to its default setting:display: block
.
– Michael_B
Mar 27 '18 at 15:31
The actual problem is discussed here: stackoverflow.com/a/41864390/3597276
– Michael_B
Mar 27 '18 at 15:37
display: flex
still removes the scroll bar
– Growler
Mar 31 '18 at 4:33
2
2
display: flex-box
was renamed to display: flex
years ago.– jhpratt
Mar 27 '18 at 4:18
display: flex-box
was renamed to display: flex
years ago.– jhpratt
Mar 27 '18 at 4:18
1
1
Switching from
display: flex
to display: flex-box
solves the problem only because display: flex-box
is completely invalid code, so the container falls back to its default setting: display: block
.– Michael_B
Mar 27 '18 at 15:31
Switching from
display: flex
to display: flex-box
solves the problem only because display: flex-box
is completely invalid code, so the container falls back to its default setting: display: block
.– Michael_B
Mar 27 '18 at 15:31
The actual problem is discussed here: stackoverflow.com/a/41864390/3597276
– Michael_B
Mar 27 '18 at 15:37
The actual problem is discussed here: stackoverflow.com/a/41864390/3597276
– Michael_B
Mar 27 '18 at 15:37
display: flex
still removes the scroll bar– Growler
Mar 31 '18 at 4:33
display: flex
still removes the scroll bar– Growler
Mar 31 '18 at 4:33
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.
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%2f49503733%2foverflow-scroll-y-not-working-with-flexbox%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
Can't get vertical scrollbar with
justify-content: flex-end
– Michael_B
Mar 27 '18 at 15:35