I would like to put a white bar that will occupy the entire width at the bottom of the screen. To do this, I thought about using absolute positioning with inherited flexbox options.
With the code following it, something like this is displayed.
Here is my code:
var NavigationBar = React.createClass({ render: function() { return( <View style={navigationBarStyles.navigationBar}> //Icon 1, Icon 2... </View> ); } }); var Main = React.createClass({ render: function() { return( <View style={mainStyles.container}> <NavigationBar /> </View> ); } }); var mainStyles = StyleSheet.create({ container: { flex: 1, backgroundColor: '#456783', } }); var navigationBarStyles = StyleSheet.create({ navigationBar: { backgroundColor: '#FFFFFF', height: 30, position: 'absolute', flexDirection: 'row', bottom: 0, justifyContent: 'space-between' }, });
I'm new to CSS styling, and not all properties are available in React-Native. So any help is appreciated, thanks :)
javascript css react-native
ilansas Apr 09 '15 at 2:56 a.m. 2015-04-09 14:56
source share