How to distribute two buttons on the left and right sides of the same parent tag using CSS

How to distribute two buttons on the left and right sides of the same parent tag using CSS

This article mainly introduces the method of CSS layout of two buttons on the left and right sides of the same parent tag, and shares it with you. The details are as follows:

Rendering

Layout Code

<view class="grace-footer" style="width:100%;" slot="gFooter">
 <view style="float:right;width:50%">
    <button type="primary" style="line-height: 85rpx; margin: 25rpx; " @click="saveService(scanKay,tableList)">Submit</button> 
 </view>
 <view style="float:left;width:50%">
  <button type="warn" style="line-height: 85rpx; margin: 25rpx;" @click="removeService()">Reset</button>
 </view>
   
</view>

style="float:right;width:50%"
It is on the right side of the parent label container and occupies 50% of the width

style="float:left;width:50%"
It is on the left side of the parent label container and occupies 50% of the width

grace-footer is the CSS code introduced by GraceUI. Its effect is the bottom navigation

.grace-footer{
     position:fixed; 
     z-index:2; left:0; 
     bottom:0; 
     background:#FFFFFF; 
     width:750rpx; 
     overflow:hidden; 
     box-shadow:1px 1px 6px #888;
}

This is the end of this article about the CSS layout method of distributing two buttons on the left and right sides of the same parent tag. For more related CSS two buttons on the left and right sides of the same parent tag, please search 123WORDPRESS.COM’s previous articles or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future!

<<:  Set the input to read-only via disabled and readonly

>>:  New usage of watch and watchEffect in Vue 3

Recommend

JavaScript Dom Object Operations

Table of contents 1. Core 1. Get the Dom node 2. ...

Several ways to clear arrays in Vue (summary)

Table of contents 1. Introduction 2. Several ways...

CSS: visited pseudo-class selector secret memories

Yesterday I wanted to use a:visited to change the...

Detailed explanation of mysql record time-consuming sql example

mysql records time-consuming sql MySQL can record...

VMware 15.5 version installation Windows_Server_2008_R2 system tutorial diagram

1. Create a new virtual machine from VMware 15.5 ...

How to use selenium+testng to realize web automation in docker

Preface After a long time of reading various mate...

my.cnf parameter configuration to optimize InnoDB engine performance

I have read countless my.cnf configurations on th...

Detailed tutorial on installing Ubuntu 19.10 on Raspberry Pi 4

Because some dependencies of opencv could not be ...

What is the base tag and what does it do?

The <base> tag specifies the default addres...

Common styles of CSS animation effects animation

animation Define an animation: /*Set a keyframe t...

8 Reasons Why You Should Use Xfce Desktop Environment for Linux

For several reasons (including curiosity), I star...

Summary of block-level elements, inline elements, and variable elements

Block element p - paragraph pre - format text tabl...

Add and delete table information using javascript

Getting Started with JavaScript JavaScript is a l...

Dynamically edit data in Layui table row

Table of contents Preface Style Function Descript...

What is JavaScript anti-shake and throttling

Table of contents 1. Function debounce 1. What is...