react native margin 1

react native margin

//the four margin directions
marginTop: 10
marginBottom : 11
marginLeft: 6
marginRight: 8

marginVertical: 10 //same as setting both marginTop and marginBottom
marginHorizontal: 7 //same as setting both marginLeft and marginRight

//sets the four directions at once
margin: 10
margin: '10%'

Here is what the above code is Doing:
1. The first line is setting the marginTop to 10.
2. The second line is setting the marginBottom to 11.
3. The third line is setting the marginLeft to 6.
4. The fourth line is setting the marginRight to 8.
5. The fifth line is setting the marginTop and marginBottom to 10.
6. The sixth line is setting the marginLeft and marginRight to 7.
7. The seventh line is setting the marginTop, marginBottom, marginLeft, and marginRight to 10.
8. The eighth line is setting the marginTop, marginBottom, marginLeft, and marginRight to 10% of the screen width.

Similar Posts