I tried using overflow hidden, box-shadow none, background none, background color transparent, outline none, border 0, border-width 0px and border none, but it doesn't change. Is there any more option I can do? I'm currently not using JavaScript or jQuery. I'm not using any framework either. How to remove the border?
header {
background-color: rgb(255, 255, 255);
height: 600px;
}
body {
font-family: Arial, Helvetica, sans-serif;
}
.navbar {
width: 98.5%;
margin: auto;
padding: 10px;
display: flex;
align-items: center;
justify-content: space-between;
outline: none;
}
.logo {
width: 160px;
cursor: pointer;
margin-right: auto;
}
.navbar .dropdown {
display: none;
box-shadow: 0px 0px 2px #000;
border-radius: 5px;
outline: none;
}
.navbar ul li:hover .dropdown {
display: block;
}
.navbar>ul>li {
position: relative;
}
.navbar>ul>li>.dropdown {
position: absolute;
top: 1.4em;
}
.navbar .dropdown li {
display: block;
margin: 15px;
margin-left: -20px;
text-align: left;
}
.navbar ul li {
list-style: none;
display: inline-block;
margin: 0 20px;
position: relative;
}
.navbar ul li a {
text-decoration: none;
color: black;
border-bottom: 0px;
}
.navbar ul li a:hover {
color: teal;
}
.navbar>ul>li::after {
content: '';
height: 3px;
width: 0;
background: teal;
position: absolute;
left: 0;
bottom: 0px;
transition: 0.5s;
}
.navbar>ul>li:hover::after {
width: 100%;
}
button1 {
list-style: none;
border: none;
background: teal;
padding: 10px 20px;
border-radius: 20px;
color: white;
font-size: 15px;
transition: 0.4s;
}
.Header-Register {
text-align: center;
}
.content {
position: relative;
bottom: 200px;
}
.Full-Name {
width: 100%;
padding: 10px 0;
margin: 5px 0;
border-left: 0;
border-top: 0;
border-right: 0;
outline: none;
background: transparent;
border-bottom: 2px solid #adadad;
}
.gender {
margin: 20px;
display: flex;
text-align: center;
justify-content: center;
}
.email {
border-bottom: 2px solid #adadad;
}
.option {
margin: 20px;
}
.Password {
margin: 20px;
border-bottom: 2px solid #adadad;
}
.Confirm-Password {
border-bottom: 2px solid #adadad;
}
.Register {
width: 5%;
padding: 5px 30px;
cursor: pointer;
display: block;
margin: auto;
background: teal;
border: 0;
outline: none;
border-radius: 5px;
color: white;
margin-top: 20px;
}
.content {
position: relative;
text-align: center;
margin-top: -190px;
bottom: 120px;
}
footer {
position: relative;
bottom: -15px;
height: auto;
background-color: rgb(255, 255, 255);
padding-top: 0px;
margin-top: 20px;
}
.socials {
display: flex;
align-items: center;
justify-content: center;
text-align: center;
list-style: none;
margin: 5px;
position: relative;
bottom: -20px;
left: -20px;
}
.socials li {
margin: 10px;
}
.socials a {
text-decoration: none;
color: #000;
font-size: 25px;
}
.footer-content{
align-items: center;
justify-content: center;
text-align: center;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<header>
<div >
<div >
<img src="icon.png" >
<ul>
<li><a href="http://127.0.0.1:3000/Project/Home.html">Home</a></li>
<li><a href="#">Products</a>
<ul >
<li><a href="#">Healthcare</a></li>
<li><a href="http://127.0.0.1:3000/Project/Products.html">Cosmetic</a></li>
<li><a href="#">Misc.</a></li>
</ul>
</li>
<li><a href="http://127.0.0.1:3000/Project/AboutUs.html">About Us</a></li>
<li><a href="#">Register</a></li>
</ul>
<a href="#" style="text-decoration:none;"><button1>Login</button1></a>
</div>
<div >
<h1>Register</h1>
</div>
</header>
<section>
<div >
<div >
<input type="text" placeholder="Full Name" required>
</div>
<div >
<input type="email" placeholder="Email" required>
</div>
<div >
<input type="radio" name="radiobutton" value="Male">
<label for="radiobutton">Male</label>
<input type="radio" name="radiobutton" value="Female">
<label for="radiobutton">Female</label>
</div>
<div>
<div >
<select>
<option value="Jakarta">Jakarta</option>
<option value="Bogor">Bogor</option>
<option value="Depok">Depok</option>
<option value="Tangerang">Tangerang</option>
<option value="Bekasi">Bekasi</option>
</select>
</div>
</div>
<div >
<input type="text" placeholder="Password">
</div>
<div >
<input type="text" placeholder="Confirm Password">
</div>
<div >
<a href="#" style="text-decoration:none; color: white;">Register</a>
</div>
</div>
<footer>
<div>
<ul >
<li><a href="https://twitter.com/Clownehara" target="_blank"><i ></i></a></li>
<li><a href="https://www.facebook.com/profile.php?id=100012662688022" target="_blank"><i ></i></a></li>
<li><a href="https://www.instagram.com/satrianavito/" target="_blank"><i ></i></a></li>
</ul>
<div >
<p>Copyright Ⓒ 2022 [NAME]. All Rights Reserved.</p>
</div>
</footer>
CodePudding user response:
Juju. By default browsers may apply some defualt styling to input elements. You can opt-out this styling by setting -webkit-appearance: none;
on the elements you wanna override.
-webkit-appearance: none;
CodePudding user response:
If you want no border its:
input {
border: none;
}
If you want no border when the input has been clicked on its (in Chrome at least):
input:focus-visible {
outline: none;
}
Snippet:
input {
border: none;
}
input:focus-visible {
outline: none;
}
header {
background-color: rgb(255, 255, 255);
height: 600px;
}
body {
font-family: Arial, Helvetica, sans-serif;
}
.navbar {
width: 98.5%;
margin: auto;
padding: 10px;
display: flex;
align-items: center;
justify-content: space-between;
outline: none;
}
.logo {
width: 160px;
cursor: pointer;
margin-right: auto;
}
.navbar .dropdown {
display: none;
box-shadow: 0px 0px 2px #000;
border-radius: 5px;
outline: none;
}
.navbar ul li:hover .dropdown {
display: block;
}
.navbar>ul>li {
position: relative;
}
.navbar>ul>li>.dropdown {
position: absolute;
top: 1.4em;
}
.navbar .dropdown li {
display: block;
margin: 15px;
margin-left: -20px;
text-align: left;
}
.navbar ul li {
list-style: none;
display: inline-block;
margin: 0 20px;
position: relative;
}
.navbar ul li a {
text-decoration: none;
color: black;
border-bottom: 0px;
}
.navbar ul li a:hover {
color: teal;
}
.navbar>ul>li::after {
content: '';
height: 3px;
width: 0;
background: teal;
position: absolute;
left: 0;
bottom: 0px;
transition: 0.5s;
}
.navbar>ul>li:hover::after {
width: 100%;
}
button1 {
list-style: none;
border: none;
background: teal;
padding: 10px 20px;
border-radius: 20px;
color: white;
font-size: 15px;
transition: 0.4s;
}
.Header-Register {
text-align: center;
}
.content {
position: relative;
bottom: 200px;
}
.Full-Name {
width: 100%;
padding: 10px 0;
margin: 5px 0;
border-left: 0;
border-top: 0;
border-right: 0;
outline: none;
background: transparent;
border-bottom: 2px solid #adadad;
}
.gender {
margin: 20px;
display: flex;
text-align: center;
justify-content: center;
}
.email {
border-bottom: 2px solid #adadad;
}
.option {
margin: 20px;
}
.Password {
margin: 20px;
border-bottom: 2px solid #adadad;
}
.Confirm-Password {
border-bottom: 2px solid #adadad;
}
.Register {
width: 5%;
padding: 5px 30px;
cursor: pointer;
display: block;
margin: auto;
background: teal;
border: 0;
outline: none;
border-radius: 5px;
color: white;
margin-top: 20px;
}
.content {
position: relative;
text-align: center;
margin-top: -190px;
bottom: 120px;
}
footer {
position: relative;
bottom: -15px;
height: auto;
background-color: rgb(255, 255, 255);
padding-top: 0px;
margin-top: 20px;
}
.socials {
display: flex;
align-items: center;
justify-content: center;
text-align: center;
list-style: none;
margin: 5px;
position: relative;
bottom: -20px;
left: -20px;
}
.socials li {
margin: 10px;
}
.socials a {
text-decoration: none;
color: #000;
font-size: 25px;
}
.footer-content {
align-items: center;
justify-content: center;
text-align: center;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>MediCare</title>
<link rel="stylesheet" href="Register.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
</head>
<body>
<header>
<div >
<div >
<img src="icon.png" >
<ul>
<li><a href="http://127.0.0.1:3000/Project/Home.html">Home</a></li>
<li><a href="#">Products</a>
<ul >
<li><a href="#">Healthcare</a></li>
<li><a href="http://127.0.0.1:3000/Project/Products.html">Cosmetic</a></li>
<li><a href="#">Misc.</a></li>
</ul>
</li>
<li><a href="http://127.0.0.1:3000/Project/AboutUs.html">About Us</a></li>
<li><a href="#">Register</a></li>
</ul>
<a href="#" style="text-decoration:none;">
<button1>Login</button1>
</a>
</div>
<div >
<h1>Register</h1>
</div>
</header>
<section>
<div >
<div >
<input type="text" placeholder="Full Name" required>
</div>
<div >
<input type="email" placeholder="Email" required>
</div>
<div >
<input type="radio" name="radiobutton" value="Male">
<label for="radiobutton">Male</label>
<input type="radio" name="radiobutton" value="Female">
<label for="radiobutton">Female</label>
</div>
<div>
<div >
<select>
<option value="Jakarta">Jakarta</option>
<option value="Bogor">Bogor</option>
<option value="Depok">Depok</option>
<option value="Tangerang">Tangerang</option>
<option value="Bekasi">Bekasi</option>
</select>
</div>
</div>
<div >
<input type="text" placeholder="Password">
</div>
<div >
<input type="text" placeholder="Confirm Password">
</div>
<div >
<a href="#" style="text-decoration:none; color: white;">Register</a>
</div>
</div>
<footer>
<div>
<ul >
<li><a href="https://twitter.com/Clownehara" target="_blank"><i ></i></a></li>
<li><a href="https://www.facebook.com/profile.php?id=100012662688022" target="_blank"><i ></i></a></li>
<li><a href="https://www.instagram.com/satrianavito/" target="_blank"><i ></i></a></li>
</ul>
<div >
<p>Copyright Ⓒ 2022 [NAME]. All Rights Reserved.</p>
</div>
</footer>
</body>
</html>