center element react native
var styles = StyleSheet.create({
content:{
flex:1,
flexDirection:'row',
alignItems:'center',
justifyContent:'center'
},
…
});
center element react native
var styles = StyleSheet.create({
content:{
flex:1,
flexDirection:'row',
alignItems:'center',
justifyContent:'center'
},
…
});
react center a text
Add textAlign: 'center' and it will center the text horizontally.
headline: {
textAlign: 'center', // <-- the magic
fontWeight: 'bold',
fontSize: 18,
marginTop: 0,
width: 200,
backgroundColor: 'yellow',
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us