how make text center instead left align
See original GitHub issue
I want to make “Login Facebook” text center align instead left, just only text not icon
<Icon.Button name="facebook" size={24} backgroundColor="#3b5998" height={40} onPress={this.loginWithFacebook}>
<Text style={{fontFamily: 'Arial', fontSize: 15, color: '#FFF', textAlign:'center'}}>Login Facebook</Text>
</Icon.Button>
textAlign not work, what I missed ?
Issue Analytics
- State:
- Created 8 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
CSS: Center block, but align contents to the left - Stack Overflow
First, create a parent div that centers its child content with text-align: center . Next, create a child div that uses display: inline-block...
Read more >How to Center Text & Headers in CSS Using the Text-Align ...
To center text in CSS, use the text-align property and define it with the value 'center.' You can use this technique inside block...
Read more >Alignment, font styles, and horizontal rules in HTML documents
This attribute specifies the horizontal alignment of its element with respect to the surrounding context. Possible values: left : text lines are rendered ......
Read more >Text Align in CSS – How to Align Text in Center with HTML
If you wanted to horizontally center all of the text on the page, then you can use the text-align property in the body...
Read more >text-align - CSS: Cascading Style Sheets - MDN Web Docs
The text-align CSS property sets the horizontal alignment of the inline-level content inside a block element or table-cell box.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@oblador how do i center the icon too?
Try adding
flex: 1
to yourText
style.