How can I create a borderless HTML textbox to work in Google Chrome browser? I would prefer to do this in CSS, if possible.
If you want a borderless input, add the w3-border-0 class.
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.
We can specify the no border property using CSS border: none, border-width : 0, border : 0 properties.
Using the CSS rule :focus { outline: none; } to remove an outline on an object causes the link or control to be focusable, but removes any visible indication of focus for keyboard users. Methods to remove it such as onfocus="blur()" result in keyboard users being unable to interact with the link or control.
CSS 3 might help here:
input[type=text],
input[type=text]:hover,
input[type=text]:focus,
input[type=text]:active
{
border: 0;
outline: none;
outline-offset: 0;
}
You can use the following to remove the border and the focus outline out of the text boxes.
input[type=text], textarea {
border: 0;
}
input[type=text]:focus, textarea:focus {
outline: none;
}
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