flex-grow

flex-grow is not working with images

馋奶兔 提交于 2020-06-12 20:37:33
问题 Currently, I'm trying to make a list. On the left side images which fit into my "display flex layout" and resize on all browsers. My "flex-grow layout" list 1 for the image and 3 for the description. Without images, everything is fine, but with my image (100% width) it does not fit into the 1/3 of the row ... Does anybody know a solution? #main { height: 100px; border: 1px solid #c3c3c3; display: -webkit-flex; /* Safari */ display: flex; } #main div:nth-of-type(1) {-webkit-flex-grow: 1;}

flex-grow is not working with images

房东的猫 提交于 2020-06-12 20:36:44
问题 Currently, I'm trying to make a list. On the left side images which fit into my "display flex layout" and resize on all browsers. My "flex-grow layout" list 1 for the image and 3 for the description. Without images, everything is fine, but with my image (100% width) it does not fit into the 1/3 of the row ... Does anybody know a solution? #main { height: 100px; border: 1px solid #c3c3c3; display: -webkit-flex; /* Safari */ display: flex; } #main div:nth-of-type(1) {-webkit-flex-grow: 1;}

flex-grow is not working with images

给你一囗甜甜゛ 提交于 2020-06-12 20:36:13
问题 Currently, I'm trying to make a list. On the left side images which fit into my "display flex layout" and resize on all browsers. My "flex-grow layout" list 1 for the image and 3 for the description. Without images, everything is fine, but with my image (100% width) it does not fit into the 1/3 of the row ... Does anybody know a solution? #main { height: 100px; border: 1px solid #c3c3c3; display: -webkit-flex; /* Safari */ display: flex; } #main div:nth-of-type(1) {-webkit-flex-grow: 1;}

Do I not understand the flex-grow property?

别等时光非礼了梦想. 提交于 2020-01-09 04:39:17
问题 I'm afraid I must not understand flex-grow. If you jump to the JSFiddle below - the way I understand it, .big should be three times the size of the other .flex-item . As you can see, not so. Why? http://jsfiddle.net/nrur6mmo/ .flex-container { display:flex; padding:0 20%; } .flex-item { flex-grow:1; list-style-type:none; border:1px solid black; } .big { flex-grow:3; } <ul class="flex-container"> <li class="flex-item big">Why isn't this exactly three times the size of the other one?</li> <li

Is there a flex-grow for IE10?

冷暖自知 提交于 2019-12-07 10:05:31
问题 Caniuse states partial support with the -ms- prefix http://caniuse.com/#search=flex-grow as far as I can understand Yet, when testing -ms-flex-grow has no effect in IE10, what am I missing here? 回答1: [ANSWER UPDATED on November 2017] flex-grow only supports internet explorer 11+, no -ms- prefix. https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow To find out what works for IE 10, use Autoprefixer 1 - Set filter to "ie 10" 2 - Type in CSS, for example: .example { flex-grow: 3; } 3 -

Is there a flex-grow for IE10?

时光怂恿深爱的人放手 提交于 2019-12-05 16:38:33
Caniuse states partial support with the -ms- prefix http://caniuse.com/#search=flex-grow as far as I can understand Yet, when testing -ms-flex-grow has no effect in IE10, what am I missing here? [ANSWER UPDATED on November 2017] flex-grow only supports internet explorer 11+, no -ms- prefix. https://developer.mozilla.org/en-US/docs/Web/CSS/flex-grow To find out what works for IE 10, use Autoprefixer 1 - Set filter to "ie 10" 2 - Type in CSS, for example: .example { flex-grow: 3; } 3 - Autoprefixer result: .example { -ms-flex-positive: 3; flex-grow: 3; } Now you know what prefix to use for IE 10

Explanation for setting “flex:1” or “flex-grow:1” on all ancestor nodes in nested flex layouts given that flex properties are not hierarchical?

橙三吉。 提交于 2019-12-04 06:24:13
问题 I've read several times that to get flex-grow to work as expected you often need to set flex-grow:1 (or flex:1 ) on the element's parent, its parent, etc, all the way up. This gave me the impression while learning flexbox that it had a hierarchical nature of some kind. But I've just learned that all of the flow-* properties are not hierarchical and apply only directly to a container and its immediate children. I think many people besides me will benefit from a clear explanation of how flex

Explanation for setting “flex:1” or “flex-grow:1” on all ancestor nodes in nested flex layouts given that flex properties are not hierarchical?

人走茶凉 提交于 2019-12-02 10:43:48
I've read several times that to get flex-grow to work as expected you often need to set flex-grow:1 (or flex:1 ) on the element's parent, its parent, etc, all the way up. This gave me the impression while learning flexbox that it had a hierarchical nature of some kind. But I've just learned that all of the flow-* properties are not hierarchical and apply only directly to a container and its immediate children. I think many people besides me will benefit from a clear explanation of how flex properties, especially flex-grow interact with the element/component hierarchy and what you're actually

Understanding flex-grow

非 Y 不嫁゛ 提交于 2019-11-29 06:50:41
I have 3 divs and if I give flex: 0.5 to first two divs, the last div should move to the next line if I have given flex-wrap: wrap . Please correct if I am wrong. Following is my html / css: .parent { display: flex; height: 100px; background-color: red; flex-wrap: wrap; } .child-1 { background-color: green; flex: 0.5; } .child-2 { background-color: yellow; flex: 0.5; } .child-3 { background-color: pink; } <div class="parent"> <div class="child-1">LOREN IPSUM LOREN IPSUM</div> <div class="child-2">LOREN IPSUMLOREN IPSUMLOREN IPSUM</div> <div class="child-3">LOREN IPSUMLOREN IPSUM</div> </div>

flex vs flexGrow vs flexShrink vs flexBasis in React Native?

被刻印的时光 ゝ 提交于 2019-11-28 15:07:43
I finally upgraded react native to 0.42 which includes the introduction of flexGrow , flexShrink , and flexBasis and the change (or fix) of how flex is rendered. I keep getting errors like: View was rendered with explicitly set width/height but with a 0 flexBasis. (This might be fixed by changing flex: to flexGrow:) View: Can someone explain the difference between flex: 1 vs flexGrow: 1 . If I apply one or the other to a View it seems to do different things but shouldn't it do the same? Here's some test code to consider: render() { return <View style={{flex: 1,backgroundColor: "cornflowerblue"