flexbox

How to divide screen to two parts in react-native?

痞子三分冷 提交于 2020-06-13 08:16:50
问题 I'm new in react-native, and I'm trying to divide screen to tow part, the first part is the header or the navigation bar wish have a specific height about 40px the second part is the body or the content of the app wish his height must be the available height on the phone screen, I tried to use flex box method but it's not working! That's my code: <View style={styles.mainContainer}> <View style={styles.navBar}> </View> <View style={styles.body}> </View> </View> Style: mainContainer: { height:

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;}

Making flexbox work in IE11

百般思念 提交于 2020-06-11 06:12:22
问题 I know there are similar questions about, but I have tried all of the suggestions and still cant get it working. I am using Bootstrap, and I have a section that is 100vh in height. Within this section I have two rows, the second row I needed placing at the very bottom of the section, but did not want to use absolute positioning. As such, I used the flex system. My layout was like so .mn120 { min-height: 120px; } img { max-width: 40%; } .mh100vh { min-height: 900px; } .col-md-4 { margin-top:

React-Native + Flex not responding to orientation change

混江龙づ霸主 提交于 2020-06-09 16:50:12
问题 I am writing a Universal iPhone/iPad application using React-Native. However I am struggling to render my view correctly when the orientation changes. Following is the source code for js file: 'use strict'; var React = require('react-native'); var { Text, View } = React; var CardView = require('./CardView'); var styles = React.StyleSheet.create({ container:{ flex:1, backgroundColor: 'red' } }); class MySimpleApp extends React.Component { render() { return <View style={styles.container}/>; } }

How to make CSS Sticky work with Flex issue

无人久伴 提交于 2020-06-09 05:49:07
问题 I have an HTML structure where I can't seem to get the CSS position sticky working. I think it because it's within the aside container. If I make aside stick it works. I want the .product-info div to be sticky and when it hits the div .content-other it unsticks. Unless with flex I could move out .personal-info and .product-info from within the aside and have them sit to the right on top of each other? Like content | Personal info | Product info Then not bother having the wrapping aside? Not

How can i adjust the img height in one column to the height of the height in another column [duplicate]

我与影子孤独终老i 提交于 2020-06-09 05:29:46
问题 This question already has answers here : One flex item sets the height limit for siblings (4 answers) How can you set the height of an outer div to always be equal to a particular inner div? (2 answers) Closed 12 days ago . In a 2 flex bootstrap columns, I would like to adjust the height of the image on the right column to the height of the text in the left columns. How could I achieve this ? img { max-width: 100%; width: 100%; } <link href="https://cdnjs.cloudflare.com/ajax/libs/twitter

How to make CSS Sticky work with Flex issue

久未见 提交于 2020-06-06 08:31:19
问题 I have an HTML structure where I can't seem to get the CSS position sticky working. I think it because it's within the aside container. If I make aside stick it works. I want the .product-info div to be sticky and when it hits the div .content-other it unsticks. Unless with flex I could move out .personal-info and .product-info from within the aside and have them sit to the right on top of each other? Like content | Personal info | Product info Then not bother having the wrapping aside? Not

Making a flexbox container height 100% in react js

陌路散爱 提交于 2020-05-29 09:48:19
问题 I'm trying to create a flex box container of 3 columns. 3 column part works. But I want them to take complete available height excluding the app bar. Css .columnContainer { display: flex; height: 100%; } .leftContainer { flex : 1; height: 200px; background-color: black; } .rightContainer { flex : 1; height: 200px; background-color: blue; } .middleContainer { flex : 3; height: 200px; background-color: green; } I have added 200px just to show those columns on screen. Tried 100% but it didnt