How to display placeholders in AngularJS for undefined expression values?

{{ counter || ‘?’}}. Just pure javascript. || can be used as default value. Since it would be different empty messages in each, a generalized directive would not be suitable for many cases. If you want to apply a different class to empty ones, that’s also built-in: <div ng-class=”{empty: !counter}” ng-bind=”counter || ?”></div>

How to make only placeholder italics in input

Sure. Just apply the style to these CSS rules: ::-webkit-input-placeholder { font-style: italic; } :-moz-placeholder { font-style: italic; } ::-moz-placeholder { font-style: italic; } :-ms-input-placeholder { font-style: italic; } Probably not all of these rules are needed. I always just reference CSS Tricks because I always forget how to do it. Edit: Note that these … Read more

Placeholder font-size bigger than 16px

The input and its placeholder must have matching font styles input { display: block; width: 400px; padding: 0 20px; } input, input::placeholder { font: 20px/3 sans-serif; } <input type=”text” placeholder=”Example Input”> A note about placeholder accessibility The screenshot included in the question shows the placeholder values being used as labels. This technique may be problematic … Read more

Changing an input’s HTML5 placeholder color with CSS does not work on Chrome

You forget a :. Because of that, the whole selector got corrupted and didn’t work. http://jsfiddle.net/a96f6/87/ Edit: Seems like (after an update?) this doesn’t work anymore, try this: input::-webkit-input-placeholder{ color:red; } input:-moz-placeholder { color:red; } Note: don’t mix the vendor prefix selectors (-moz, -webkit, -ms, …). Chrome for example won’t understand “-moz-” and then ignores … Read more

keep placeholder on focus in IE10

The :-ms-input-placeholder pseudo-class documentation from the Internet Explorer Developer Center seems to imply this is working as designed. The placeholder text is displayed with the specified style until the field has focus, meaning that the field can be typed into. When the field has focus, it returns to the normal style of the input field … Read more

How to change placeholder color on focus?

Try this, this should work : input::-webkit-input-placeholder { color: #999; } input:focus::-webkit-input-placeholder { color: red; } /* Firefox < 19 */ input:-moz-placeholder { color: #999; } input:focus:-moz-placeholder { color: red; } /* Firefox > 19 */ input::-moz-placeholder { color: #999; } input:focus::-moz-placeholder { color: red; } /* Internet Explorer 10 */ input:-ms-input-placeholder { color: #999; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)