flexbox

Unexpected scrolling behavior within flex element [duplicate]

怎甘沉沦 提交于 2020-01-06 05:39:06
问题 This question already has answers here : Centered elements inside a flex container are growing and overflowing beyond top [duplicate] (3 answers) Can't scroll to top of flex item that is overflowing container (7 answers) Closed last year . Could somebody explain why the top section is being cut off here: https://jsbin.com/yuhexoz/edit <div style=" display: flex; flex-direction: row; justify-content: center; align-items: center; position: relative; top: 100px; left:100px; width:200px; height:

How to make a flexbox container to scroll?

旧街凉风 提交于 2020-01-06 04:04:29
问题 I have a vertical flexbox container on which I set a specific height and set it to scroll vertically when overflows. The problem is that the flex container won't scroll if its content overflows. Here is a plunker that demonstrate what i'm talking about: http://plnkr.co/edit/3t4cuxMSGuNr88u0Whdl?p=preview. .flex-container { display: flex; flex-direction: column; overflow-y: scroll; height: 600px; width: 400px; } .block-container { overflow-y: scroll; height: 600px; width: 400px; margin-left:

Gaps between items only

痴心易碎 提交于 2020-01-06 03:33:07
问题 I need flex items with vertical gaps (10px) between items. Without gaps around. Solution with .container {margin: 0 -5px} is not good, it makes horizontal scrollbar for some reason. No responsive breakpoints please. Code on Codepen Here is my code without gap: .container { max-width:700px; margin:20px auto; display:flex; flex-direction:row; flex-wrap: wrap; } div > div { min-width:300px; background:lightblue; border:1px solid blue; flex-grow: 1; margin:5px 0px; padding:10px; } <div class=

Flexbox centering and overflow bug in IE10?

爷,独闯天下 提交于 2020-01-06 01:50:27
问题 What I want to do basically is have a header and a container always centered if they're small than the screen (body with 100% height). In case the content and header are bigger than the screen, then allow to scroll inside its container (notice that the header shouldn't be scrollable). I managed to make it work in Chrome but not in IE10. This is the JSFiddle. var p = $('p'); $('button').click(function(){ for(var i=0; i<30; i++){ $('.content').append(p.clone()); } }); .screen{ border: 1px solid

Flexbox to fill out row and determine the number of children per row

南笙酒味 提交于 2020-01-06 00:53:08
问题 I have a bunch of boxes in a container. I don't know how many boxes fit onto a row, the bigger your screen is the more boxes there should be. However I want each row to be fully filled and the boxes resized (within 100px to 150px) to ensure that each row is filled. http://jsfiddle.net/ssxu5moy/11/ .container2 { width:100%; height: 100px; display: flex; flex-wrap: wrap; align-items: stretch; align-content: stretch; } .box { border: 1px solid purple; background: blue; align-self: stretch; min

Flexbox to fill out row and determine the number of children per row

假如想象 提交于 2020-01-06 00:51:04
问题 I have a bunch of boxes in a container. I don't know how many boxes fit onto a row, the bigger your screen is the more boxes there should be. However I want each row to be fully filled and the boxes resized (within 100px to 150px) to ensure that each row is filled. http://jsfiddle.net/ssxu5moy/11/ .container2 { width:100%; height: 100px; display: flex; flex-wrap: wrap; align-items: stretch; align-content: stretch; } .box { border: 1px solid purple; background: blue; align-self: stretch; min

Do you have to use -webkit- syntax anymore?

∥☆過路亽.° 提交于 2020-01-05 08:14:38
问题 I'm using the flex box technique to layout my webpage, but I have come across with some confusion about the syntax. What I'm confused about is do you have to use -webkit- anymore or has all browsers implemented HTML5 yet. I have been looking for answers on the various websites and one person says you need to use the -webkit- syntax and another person says you don't have to use it anymore. I understand what flex boxes do I'm just confused on whether you need to use -webkit- or not. If I don't

Do you have to use -webkit- syntax anymore?

戏子无情 提交于 2020-01-05 08:12:13
问题 I'm using the flex box technique to layout my webpage, but I have come across with some confusion about the syntax. What I'm confused about is do you have to use -webkit- anymore or has all browsers implemented HTML5 yet. I have been looking for answers on the various websites and one person says you need to use the -webkit- syntax and another person says you don't have to use it anymore. I understand what flex boxes do I'm just confused on whether you need to use -webkit- or not. If I don't

white-space css property is creating issues with flex [duplicate]

一曲冷凌霜 提交于 2020-01-05 08:08:50
问题 This question already has an answer here : Why don't flex items shrink past content size? (1 answer) Closed last year . I am facing issues with white-space:nowrap when there is flex container. There is a flex container with flex-direction:row; in which there are two divs sidebar with certain width set using flex:0 0 70px; and the main-content . In the main-content with flex-direction:column two main divs, header and the content . Now in the content , there are three blade that has flex-grow:1

Flexbox - justify specific element [duplicate]

南笙酒味 提交于 2020-01-05 05:30:07
问题 This question already has answers here : Center and right align flexbox elements (7 answers) Closed last year . I’m using Flexbox, I want to create container that contains two divs in one row. One of them should be horizontally centered(relatively to container) and second one should be on the left(like it wouldn't be justified). Is there any solution that doesn’t require a third, hidden div? Unfortunately both of divs don’t have specified width. Here is the structure of html: <div class=