I'm trying to remove top, right and left borders for text input fields, using bootstrap 3. My selector is:
input[type="text"] {
border-top: 0;
border-right: 0;
border-left: 0;
}
It's still showing (in chrome) a slight thin line.
I'm not sure how to get that ghost line to disappear
Answer: Use CSS outline property This is the default behavior of chrome, however if you don't like it you can easily remove this by setting their outline property to none .
In Bootstrap 4, you can add border-0 class to your element to remove its border. Save this answer.
The border-left-0 class is used to remove the left border in Bootstrap 4.
Use the :focus pseudo-class with the "no-outline" class to style the form fields that are focused by the user. To have clear fields in your forms, set the outline property to its "none" value, which is used to display no outline.
You did remove the border from top left and right. That "ghost line" you see, it is the inset shadow. You can remove that as well
input[type="text"] {
border-top: 0;
border-right: 0;
border-left: 0;
-webkit-box-shadow: none;
box-shadow: none;
}
and if you want to remove that when a user "focuses" the field
input[type="text"]:focus {
-webkit-box-shadow: none;
box-shadow: none;
}
Write this in your css file.
input {
border: none;
}
If it is not working please share your html code.
If your form uses tags <fieldset>
, try to remove their borders too:
fieldset {
border: 0;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With