This is a migrated thread and some comments may be shown as answers.

Bootstrap Placeholder/OptionLabel Colors

4 Answers 349 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Brian
Top achievements
Rank 2
Iron
Brian asked on 08 Nov 2017, 05:06 PM

Hi,

I'm using the Bootstrap v3 Telerik MVC theme.  Can I style the text box Placeholders and dropdown list OptionLabels to have the same default placeholder color?  Right now the defaults for Placeholders are gray and the defaults for OptionLabels are black.

Thanks!

4 Answers, 1 is accepted

Sort by
0
Accepted
Ivan Zhekov
Telerik team
answered on 10 Nov 2017, 03:14 PM
Hi, Brian.

When the value of dropdownlist is equal to the option label we don't mark it in any special way. You could, however, hook to dataBound and changeEvent and perform the marking there. You also need a bit of styling. I've created a simple dojo that shows one way of doing it: https://dojo.telerik.com/@joneff/aXugAY.

Regards,
Ivan Zhekov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Brian
Top achievements
Rank 2
Iron
answered on 13 Nov 2017, 12:42 PM

Hi Ivan,

It seems to work in Chrome, but not IE11.  Do you know if there is similar styling for IE11?

Regardless, thanks for your response; I'll mark it as answered!

0
Accepted
Ivan Zhekov
Telerik team
answered on 15 Nov 2017, 07:57 AM
Hi, Brian.

IE 11 does not recognize the ::placeholder selector and discards the entire rule. You could, however, add another rule to target IE 11 like so:

.k-input.k-placeholder,
.k-input:-ms-input-placeholder {
  color: inherit;
  opacity: .7;
}

I've updated the original snippet to include those styles

Regards,
Ivan Zhekov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Brian
Top achievements
Rank 2
Iron
answered on 16 Nov 2017, 01:27 PM
Perfect, thanks so much!
Tags
General Discussions
Asked by
Brian
Top achievements
Rank 2
Iron
Answers by
Ivan Zhekov
Telerik team
Brian
Top achievements
Rank 2
Iron
Share this question
or