How to make component stick to bottom in ScrollView but still alow other content to push it down

Use flexGrow instead of flex. Example code is given bellow. <ScrollView contentContainerStyle={{ flexGrow: 1, flexDirection: ‘column’, justifyContent: ‘space-between’ }}> <View style={{ width: 50, height: 1000, backgroundColor:’orange’ }} /> <View style={{ width: 50, height: 50, backgroundColor:’black’}} /> <View style={{ width: 50, height: 50, backgroundColor:’blue’}} /> </ScrollView> Here is the screenshot

Center a group of wrapped flex items [duplicate]

Not sure what kind of centering you want do So a few options: Option 1: just center the elements in .container add justify-content: center; to .container instead main { background-color: blue; width: 390px; display: flex; } .container { background-color: red; display: flex; flex-wrap: wrap; justify-content:center; } .a1 { color: grey; width: 100px; height: 200px; background-color: … Read more

Can I transition the flex-grow of a flex box to produce an animation?

flex-grow is animatable but only if the value is a <number>. However it seems that Google Chrome (v41) doesn’t trigger the animation if the value is set to 0. A workaround for this could be to use a very small value instead — something like 0.0001: Updated example. $(“.item”).click(function() { $(“.item”).addClass(“collapse”); $(this).removeClass(“collapse”); }); html, body … Read more

Flex elements ignore percent padding in Firefox

See https://lists.w3.org/Archives/Public/www-style/2015Sep/0038.html Grid/Flex Percentages The group tried to work through how vertical percentage margins and paddings are defined. Note: Top and bottom margins in CSS have traditionally resolved against the containing block width instead of its height, which has some useful effects but is generally surprising. Existing layout modes must of course continue to do … Read more

CSS flexbox max column number?

You can set the flex-basis property of .twit which tells flexbox what base width to give each .twit element, before splitting up the remaining space to all elements. try adding the following CSS to .twit (I used 30% not 33% to account for margins and padding, but you can play with this number.) flex-basis: 30%;

Row Wrap in flex-box not wrapping in Safari

Per a comment on bugs.webkit.org, it seems the solution is simple! If your style is div.flex { display: -webkit-flex; display: flex; -webkit-flex-wrap: wrap; flex-wrap: wrap; -webkit-flex-direction: row; flex-direction: row; } div.flex .item { min-width: 15em; -webkit-flex: 1; flex: 1; } you just need to add more explicitness to your flex declaration. In fact, I think … Read more