Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

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',
  }
Comment

PREVIOUS NEXT
Code Example
Javascript :: console.dir depth 
Javascript :: adding integers jquery 
Javascript :: string to int javascript 
Javascript :: create stack navigator has been moved to react-navigation-stack 
Javascript :: nodejs get current directory 
Javascript :: js number validation 
Javascript :: js replace all char in string 
Javascript :: how to make a screen recording software with js 
Javascript :: adding font awesome to npm or react 
Javascript :: how to hover the mouse on an element cypress mouseover 
Javascript :: detect browser theme 
Javascript :: fontawesome in next js 
Javascript :: react set title of page 
Javascript :: detect fullscreen mode 
Javascript :: math random 0 to 100 
Javascript :: props.history.push with data 
Javascript :: get scroll position jquery 
Javascript :: disable option dropdown jquery 
Javascript :: login discord token 
Javascript :: fetch bearer token 
Javascript :: how to check file extension in node js 
Javascript :: split by whitespace javascript 
Javascript :: regex cpf javascript 
Javascript :: updatedAt 
Javascript :: js today set time 
Javascript :: get select option selected text jquery 
Javascript :: js map iterate 
Javascript :: js addeventlistener mouseout 
Javascript :: react function with form 
Javascript :: how to move an image with arrow keys in javascript 
ADD CONTENT
Topic
Content
Source link
Name
7+8 =