Skip to content

Instantly share code, notes, and snippets.

@abhishekjakhar
Last active March 6, 2024 05:17
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save abhishekjakhar/493d920a219ed9d88f1846cd31de7751 to your computer and use it in GitHub Desktop.
Save abhishekjakhar/493d920a219ed9d88f1846cd31de7751 to your computer and use it in GitHub Desktop.
HTML Forms CSS File
*, *:before, *:after {
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
body {
font-family: 'Lato', sans-serif;
color: #333;
background-color: #f8f8f9;
}
form {
max-width: 480px;
margin: 50px auto;
padding: 16px;
border: 1px solid #eaeaea;
}
input[type="text"],
input[type="password"],
input[type="date"],
input[type="datetime"],
input[type="email"],
input[type="number"],
input[type="search"],
input[type="tel"],
input[type="time"],
input[type="url"],
textarea,
select {
background-color: #ffffff;
border: 1px solid #e5e5e4;
font-size: 16px;
height: auto;
margin: 0;
outline: 0;
padding: 8px 18px;
height: 48px;
width: 100%;
color: #8a97a0;
box-shadow: 0 1px 0 rgba(0,0,0,0.03) inset;
margin-bottom: 16px;
transition: all .2s ease;
}
input::placeholder {
color: #999;
}
input:focus,
textarea:focus,
select:focus {
border-color: #0f868c;
}
input[type="radio"],
input[type="checkbox"] {
margin: 0 4px 8px 0;
}
select {
padding: 6px;
height: 32px;
border-radius: 2px;
}
button {
font-size: 16px;
font-weight: 600;
text-transform: uppercase;
padding: 15px 26px;
color: #FFF;
background-color: #0f868c;
border-radius: 4px;
border: 1px solid #0f868c;
text-align: center;
width: 100%;
}
fieldset {
margin-bottom: 28px;
border: none;
}
legend {
font-size: 28px;
font-weight: 400;
margin-bottom: 16px;
}
label {
display: block;
line-height: 24px;
font-size: 16px;
font-weight: 400;
margin-bottom: 4px;
}
label.light {
font-weight: 300;
display: inline;
}
@chunhsianglan
Copy link

hello :)
Please could you also share the form html file here?
Just trying to see if my html is right.
Thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment