Osman
Osman

Reputation: 1771

Color attribute is adding a colored border in Chrome

Let me start by saying, I like the border that chrome is using for my inputs, my issue arrises for the textarea. The textarea is using the color attribute as a border as well as the intended function of coloring the inputed text. Here is my css:

select, textarea, input{ font-size:25px; font-weight:bold; color: #FF4500;}

As i said I want the border that chrome makes, I just dont want the colored border it puts around ONLY the textarea for some reason. There any way i can apply the color to just the text or maybe prevent the color attribute from changed the border color?

Upvotes: 2

Views: 1637

Answers (1)

Jukka K. Korpela
Jukka K. Korpela

Reputation: 201768

Remove the setting (in code other than the part you posted) that sets border properties on textarea, such as border-width or border-radius.

The reason is such settings may make Chrome (or other browsers) use a normal border around an element, as determined by CSS properties on it, instead of the default border it draws with special routines that are immune to CSS. The effects vary by browser and by property. For example, with your example code, on Chrome, if you add border-style: solid, then an input element gets orange red border, but select and textarea keep their default gray borders. But if you add border-radius: 8px instead, then input keeps its default border color (though with rounded corners) whereas both select and textarea get orange red borders.

Upvotes: 2

Related Questions