I want to implement page that looks like
It has next button
that must in absolute position
in the middle of the page, and next to it there is skip button
that the text must center with next button
's text.
I am struggling to make this happen using flexbox
, maybe someone can help me.
so far my code is like this
component:
<View style={{ alignSelf: 'center', position: 'absolute' }}>
<Button
buttonStyle={styles.nextButton}
onPress={this._onPress}
activeOpacity={0.9}
>
<Text style={styles.nextText}>NEXT</Text>
</Button>
<Text
style={styles.skipButton}
onPress={this._onSkipPress}
>
SKIP
</Text>
</View>
styles:
nextButton: {
backgroundColor: 'white',
height: 52,
width: 128,
borderRadius: 26,
bottom: 24,
elevation: 1
},
skipButton: {
marginRight: 20,
fontSize: 14
},
I know that this is react-native
code, but if you can solve it using css
, I believe I can convert it to react-native
.
Note: please use flexbox
only