0

This is how the layout look

So I have a box with some text inside it, below the text I want to add 2 buttons which will allow users to mark a parking space as available or taken. Below you can see the styling of the main grey box

    parkingPopUpText:{
      fontSize: 16,
      marginLeft:10,
      marginTop:7,

    },

If I simply add the buttons below the text this is how it places it. This is the code for the button

      height:50,
      width:50,
      backgroundColor:'#38c75e',
      borderRadius:10

I want to place the button to the bottom left of the grey box, while the second button will be to the bottom right of the box. I know this is probably an easy fix but I can't seem to be able to find a solution. Thanks in advance!

cristian9804
  • 63
  • 1
  • 12

2 Answers2

0

As i mentioned below, Try to use position: 'absolute'

upBottonView: {
    position: 'absolute',
    right: '5%',
    top: '95%',
    width: 40,
    height: 40,
    borderRadius: 10,
  },

Feel free for doubts.

SRanuluge
  • 667
  • 6
  • 9
0

Give your modal container view position relative and then give your button container view position absolute

//parent view
 modalContainer{
 position: 'absolute',
 //other styling
 }

//child view
buttonContainer{
position: 'absolute',
right: '5%',
top: '95%',
width: 40,
height: 40,
borderRadius: 10,

}

Rishi Sahu
  • 496
  • 3
  • 11