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

Input file custom button beautification (demo)

I have written such an article before, but I used...

Summary of several common logs in MySQL

Preface: In the MySQL system, there are many diff...

How to declare a cursor in mysql

How to declare a cursor in mysql: 1. Declare vari...

Examples of using html unordered list tags and ordered list tags

1. Upper and lower list tags: <dl>..</dl...

MySQL case when usage example analysis

First we create the database table: CREATE TABLE ...

Two ways to completely delete users under Linux

Linux Operation Experimental environment: Centos7...

Detailed tutorial on MySql installation and uninstallation

This article shares the tutorial of MySql install...

Implementation of CentOS8.0 network configuration

1. Differences in network configuration between C...

How to run py files directly in linux

1. First create the file (cd to the directory whe...

JavaScript modularity explained

Table of contents Preface: 1. Concept 2. The bene...

Detailed analysis of classic JavaScript recursion case questions

Table of contents What is recursion and how does ...

js to implement collision detection

This article example shares the specific code of ...

Detailed tutorial on VMware installation of Linux CentOS 7.7 system

How to install Linux CentOS 7.7 system in Vmware,...

Implementation of Docker batch container orchestration

Introduction Dockerfile build run is a manual ope...