I have a Cordova app that has a search field in a toolbar. It is a regular HTML input field with the borders hidden and background set to be transparent. When the user starts typing on Android (5.0), the current word is underlined in black, while the keyboard is offering up auto-complete suggestions. I have tried to set the following attributes on the input field:
<input autocomplete="off" autocorrect="off" autocapitalize="off" spellcheck="false" class="search" ng-change="search()" ng-model="ident" placeholder="Search" style="text-decoration: none;">
This does not seem to fix the problem however. How can I prevent this behaviour?
Add the same text-decoration: none ! important; to . text-row and if it still doesn't work, I guess the line isn't an underline. So you try others like outline: none and border: none .
To underline a text in HTML, use the <u> tag. The <u> tag deprecated in HTML, but then re-introduced in HTML5. Now it represents a text different from another text stylistically, such as a misspelled word.
You have wrapped parts of your HTML markup with <u> elements which have a default style of text-decoration: underline; which comes from the user agent's default stylesheet. I suggest amending the HTML markup to remove the <u> elements.
To remove underline from a link in HTML, use the CSS property text-decoration. Use it with the style attribute. The style attribute specifies an inline style for an element. Use the style attribute with the CSS property text-decoration to remove underline from a link in HTML.
use border-bottom instead of text-decoration:
a:link {
text-decoration: none;
border-bottom: none;
-webkit-box-shadow: none;
box-shadow: none;
}
You can try adding this: !important
right before the ; symbol.
This will give the code priority.
a:link {
text-decoration: none!important;
border-bottom: none!important;
}
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