简体   繁体   中英

How to make Edit and Delete Buttons side by side and have the same size and text in the center

I am trying to make Edit and Delete Button side by side and have the same size. The text in the button should be in the center.

在此处输入图像描述

I have tried a lot of methods. For example,

  1. btn-group. These two button will be side by side but not same size
  2. width:50%. These two button will be side by side and same size but the text in delete button will not be in the center.
  3. btn-block. These two button will be same size and text will be in the center but they are not in the same line.

 <td> <Button className="btn-block btn-warning">Edit</Button> <Button className="btn-block btn-danger">Delete</Button> </td>

I am trying to make Edit and Delete Button side by side and have the same size. The text in the button should be in the center.

在此处输入图像描述

I have tried a lot of methods. For example,

  1. btn-group. These two button will be side by side but not same size
  2. width:50%. These two button will be side by side and same size but the text in delete button will not be in the center.
  3. btn-block. These two button will be same size and text will be in the center but they are not in the same line.

 <td> <Button className="btn-block btn-warning">Edit</Button> <Button className="btn-block btn-danger">Delete</Button> </td>

I am trying to make Edit and Delete Button side by side and have the same size. The text in the button should be in the center.

在此处输入图像描述

I have tried a lot of methods. For example,

  1. btn-group. These two button will be side by side but not same size
  2. width:50%. These two button will be side by side and same size but the text in delete button will not be in the center.
  3. btn-block. These two button will be same size and text will be in the center but they are not in the same line.

 <td> <Button className="btn-block btn-warning">Edit</Button> <Button className="btn-block btn-danger">Delete</Button> </td>

I am trying to make Edit and Delete Button side by side and have the same size. The text in the button should be in the center.

在此处输入图像描述

I have tried a lot of methods. For example,

  1. btn-group. These two button will be side by side but not same size
  2. width:50%. These two button will be side by side and same size but the text in delete button will not be in the center.
  3. btn-block. These two button will be same size and text will be in the center but they are not in the same line.

 <td> <Button className="btn-block btn-warning">Edit</Button> <Button className="btn-block btn-danger">Delete</Button> </td>

I am trying to make Edit and Delete Button side by side and have the same size. The text in the button should be in the center.

在此处输入图像描述

I have tried a lot of methods. For example,

  1. btn-group. These two button will be side by side but not same size
  2. width:50%. These two button will be side by side and same size but the text in delete button will not be in the center.
  3. btn-block. These two button will be same size and text will be in the center but they are not in the same line.

 <td> <Button className="btn-block btn-warning">Edit</Button> <Button className="btn-block btn-danger">Delete</Button> </td>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM