Saturday, March 18, 2023
HomeCSScss - Why the switch size is fantastic than inputs, they are...

css – Why the switch size is fantastic than inputs, they are done in the exact same type

i have a React code that is doing straightforward type:

 return (
<< type onSubmit= {handleSubmit} className=" login-form">
<> < tag>>.
<< input.
kind=" message"
worth= {username}
onChange= {(occasion) => > setUsername(}
className=" input"
<< br/>>.
<< tag>>.
<< input.
kind=" password"
worth= {password}
onChange= {(occasion) => > setPassword(}
className=" input"
<< br/>>.
<< switch kind=" send" className=" switch">> Login< .

The truth is when i'm styling this code i obtain the witdh switch is higher than inputs however i do not comprehend what i'm doing poor, since its providing 100% size in both aspects.

 body {
margin: 0;
cushioning: 0;.
font-family: sans-serif;.
background-color: #f 1f1f1;.

. login-form {
screen: flex;.
align-items: facility;.
justify-content: facility;.
elevation: 100vh;.
cushioning: 20px;.
flex-direction: column;.
background-color: white;.
box-shadow: 0 0 10px 3px rgba( 0, 0, 0, 0.1);.

. tag {
font-size: 18px;.
font-weight: vibrant;.
margin-bottom: 5px;.

. input {
cushioning: 10px;.
font-size: 18px;.
boundary: 1px strong #ddd;.
screen: block;.
margin-bottom: 10px;.
size: 100%;.

. switch {
cushioning: 10px 20px;.
font-size: 18px;.
background-color: # 4caf50;.
shade: white;.
boundary: none;.
arrow: guideline;.
size: 100%;.

So, what i'm doing incorrect? I believed the switch size 100% would certainly have been adjust to course type

enter image description here


Most Popular

Recent Comments