Menu
  • HOME
  • TAGS

How to know Placeholder String width in px by Jquery/Javascript?

javascript,jquery,string,placeholder

You could use following snippet: var _$tmpSpan = $('<span/>').html($('#Test').attr('placeholder')).css({ position: 'absolute', left: -9999, top: -9999 }).appendTo('body'), textWidth = _$tmpSpan.width(); _$tmpSpan.remove(); alert(textWidth); --DEMO-- ...

Exclude placeholders on validation in IE8

html,validation,internet-explorer-8,placeholder

You may want to read the docs before posting on SO: The plugin automatically adds class="placeholder" to the elements who are currently showing their placeholder text. So, if your user enters a phone number, the placeholder class will be removed by the plugin. You can check for that class using...

Padding for placeholder without changing the size of input

css,padding,placeholder,search-form

Try adding text-align:center for id searchfield or add box-sizing: border-box; declaration. try with any one of below examples, it will move the placeholder to right as you expected, these will support Ie lower versions too. Example1 (using box-sizing:border-box declaration) #searchfield { padding: 10px 0 13px 0px; box-sizing: border-box; } Example2...

Images not shown on IE11

image,symfony2,internet-explorer-11,placeholder,liipimaginebundle

So what I did was to remove the no-sniff directive <IfModule mod_headers.c> #Header set X-Content-Type-Options: nosniff </IfModule> It seems that IE11 fails to get the correct content type of the image when no-sniff is turned on....

Dynamically set form placeholder text with helpers in Rails 4

ruby-on-rails,forms,dynamic,helper,placeholder

Try this instead of title_template_'#{@template.id}' :placeholder => send("title_template_#{@template.id}") ...

Sitecore Changing Template

inheritance,sitecore,placeholder

I think this is a side effect of how Layout Deltas in Sitecore work. When you define presentation in your Template, your setting up a bit of XML that describes the Template's idea of what the set of controls should be. When you then edit the Presentation Details on an...

Having a placeholder in a Select option [duplicate]

html,select,placeholder

I think this is what you want . HTML: <select id="choice"> <option value="0" selected="selected">Choose...</option> <option value="1">Something</option> <option value="2">Something else</option> <option value="3">Another choice</option> </select> CSS : #choice option { color: black; } .empty { color: gray; } JavaScript: $("#choice").change(function () { if($(this).val() == "0") $(this).addClass("empty"); else $(this).removeClass("empty") }); $("#choice").change(); try this...

Could not resolve placeholder from properties file while importing XML

xml,spring,properties,placeholder

Here is a Class that can be used to accomplish this: https://github.com/PE-INTERNATIONAL/org.spring.utils...

UITextField set placeholder color as dark in iOS

ios,objective-c,uitextfield,placeholder

As suggested by Apple, subclassing UITextField and overriding - (void)drawPlaceholderInRect:(CGRect)rect is the way to go: - (void)drawPlaceholderInRect:(CGRect)rect { UIColor *colour = [UIColor lightGrayColor]; if ([self.placeholder respondsToSelector:@selector(drawInRect:withAttributes:)]) { // iOS7 and later NSDictionary *attributes = @{NSForegroundColorAttributeName: colour, NSFontAttributeName: self.font}; CGRect boundingRect = [self.placeholder boundingRectWithSize:rect.size options:0 attributes:attributes context:nil];...

Placeholder in cakephp

cakephp,placeholder

Sorry I have solved my problem by doing in this way <?php e($form->input('City.keyword',array('id'=>'CityKeyword','div'=>false,'label'=>false,'class'=>'forminput-new',"placeholder"=>"Consultant's name -OR- Area of expertise",'value'=>$keyword,'style'=>'width:99%;'))) ?> thanks...

Why is CSS text color overriding placeholder color in IE 10?

css,internet-explorer,placeholder

Chances are your input[type=text] selector appears after your input:-ms-input-placeholder selector in your stylesheet, which is causing it to take precedence (because both selectors are equally specific). If that's the case, you'll want to move the placeholder rule below in order for that to take precedence. The most likely reason it...

Form placeholder in django doesn't show properly

python,django,forms,placeholder

Try to change base_fields here: for field in self.base_fields.values(): to fields: for field in self.fields.values(): base_fields dictionary is the base set of fields defined for the class. You can change it but it is not recommended and in your case not needed. I guess your version would work if you...

Placeholder font-size bigger than 16px

css,html5,placeholder

The input and its placeholder must have matching font styles input { width: 400px; height: 80px; } input, input::-webkit-input-placeholder { font-size: 20px; line-height: 2; } <input type="text" placeholder="This gets cut"> ...

Font Awesome and text both in placeholder

html,css,font-awesome,placeholder

To accomplish this, use FontAwesome as font by setting the CSS font-family to FontAwesome and referring to the icons you want using the FontAwesome Unicode reference. For example, to have fa-envelope appear in a placeholder, you can use the following: <style type="text/css"> input {font-family:FontAwesome;} </style> <!-- use &#xf0e0; which is...

Jquery - Restore Changed Placeholder?

jquery,placeholder,restore

You can take another attribute for old placeholder like in my code I take data-placeholder which hold old value when you want it can be used as old placeholder. HTML <input type='checkbox' name='u_id'> <input type="text" name="id" placeholder="ABC123" data-placeholder="ABC123"> ^^^^^^^^^^^ jQuery $('[name^="u_"]').change(function(){ if($(this).is(":checked")) { $(this).next("input, select").attr("disabled",true); $(this).next("input, select").attr("placeholder", "New Holder"); }...

Placeholder opens jQuery UI autocomplete combobox on page load (IE10)

jquery,jquery-ui,autocomplete,placeholder

We noticed that the issue was being solved by actually focusing the comboboxes. Once the combobox is focused, the autocomplete box disappeared and it remained that way when the combobox lost focus. So, our solution was a bit hack-ish, we added a .focus() followed by a .blur() : _create: function...

Cursor appears above contenteditable div with placeholder and :before attribute

css,css3,contenteditable,placeholder

DEMO Disadvantage/Advantage of this solution: This solution will hide the text on focusing the element which is a disadvantage but its more or less a good thing as many peoples use javascript to hide placeholder text on input fields focus. Details: 1) Content shouldn't be a part of css, hence...

Styling part of the text in the placeholder

css,html5,placeholder

You may want to think about what the role and meaning of placeholders is. Most UI experts agree: placeholders are not labels. Labels (like "Search") are labels, and should be outside the text area. The placeholder is designed to be a sample input, or a format, not a label, nor...

How can I create a searchbar like this?

css,animation,search,placeholder,smooth

Here is a simple example of how to style a search field in a similar manner as seen in your example. display: flex does most of the magic here, the rest is getting rid of backgrounds and borders or styling the submit button with an image For the typing animation...

Usage of ternary operator as placeholder

c,sorting,placeholder,ternary-operator,bubble-sort

You cannot do it this way. But you can write an expression that will do a conditional comparison: if (is_ascending ? ptr->next->value < ptr->value : ptr->next->value > ptr->value) ... If is_ascending is guaranteed to be 0 or 1, here is an alternative with a single test that may be faster:...

Perl DBI placeholders other than ?s

sql,perl,placeholder,dbi

Use only placeholders my $sql = "INSERT INTO queues_detail (id,keyword,data,flags) VALUES "; $sql .= join ', ', ("(?,?,?,?)") x @data; $dbh->do($sql, $undef, map { $id, @$_ } @data); Or don't use any at all my $sql = "INSERT INTO queues_detail (id,keyword,data,flags) VALUES "; $sql .= join(', ', map { "("...

How to make only placeholder italics in input

html,input,placeholder

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...

jQuery & CSS - temporary placeholder for image when they are different sizes

jquery,css,timeout,placeholder

Instead of placing the placeholder in the image source itself, you can place it in the background of the image, which saves you some code as well. See this fiddle Just add a .placeholder class to the image : <img class="delay placeholder" src="" data-src="http://placehold.it/260x280/E8117F/FFFFFF?text=image+1" alt="" style="padding-top:120px; padding-bottom:120px"/> Then the CSS...

Adding HTML Within Placeholder

javascript,html,textarea,placeholder

The placeholder attribute has plain text as its value, by definition. No tags are recognized. Character references are recognized, but the effects of characters like TAB U+0009 (&#09;) are defined to be implementation-dependent. So no, you can’t have HTML markup there. Your ultimate problem might have a solution, but you...

How can I make my placeholder show when the textarea is not selected?

javascript,jquery,html5,placeholder

a jquery solution: you can use .focus() and .blur() events to handle your content of your textarea: so, when you focus, you don't need to display anything: $('textarea').focus(function () {$(this).empty()}); and when you don't focus on it: $('textarea').blur(function () {$(this).html('your placeholder...').css('color','gray');}); you can also check if user entered anything: $('textarea').blur(function...

How to escape a { character in a MessageFormat pattern string?

java,replace,placeholder,illegalargumentexception,messageformat

Put a pair of single quotes around the part you don't want to be treated as parameter placeholders. i.e. ABC '{A WELL-KNOWN MAGICIAN}' WILL PERFORM AT {0} FOR {1} HOURS. ...

How to move the PLACEHOLDER text to the top

html,css,html5,css3,placeholder

You may use a textarea instead of an input, try that! and if you want to make it bigger just add cols="x" and rows="x" atributes on the textarea tag.

how to get textbox value in placeholder on code behind?

c#,asp.net,webforms,textbox,placeholder

Below code will help you protected void ddlUserSelected_SelectedIndexChanged(object sender, EventArgs e) { for (int a = 1; a <= int.Parse(ddlUserSelected.SelectedItem.Text); a++) { TextBox txtDate = new TextBox(); Label lbl = new Label(); lbl.Text = "<br/>"; txtDate.Width = 70; txtDate.CssClass = "tbl"; txtDate.ID = "txtDate" + a; PlaceHolder1.Controls.Add(txtDate); PlaceHolder1.Controls.Add(lbl); } }...

Create Python string placeholder (%s) n times

string,list,python-2.7,tuples,placeholder

Here is what I came up with - it is based on dwanderson's approach in the 2nd comment of the original post (question): table_name = name_a #name of table # Loop through all columns of dataframe and generate one string per column: cols_n = df.columns.tolist() placeholder = ",".join(["%s"]*df.shape[1]) #df.shape[1] gives...

How to use Resource File for html parameters?

html,.net,title,placeholder,resx

I have found solution to my problem. I have to use the following syntax to get words with spaces. <a title='@HttpContext.GetGlobalResourceObject(CustomersResource, "t_GoBackCustomer")'> The single quotes did the magic. For labels and controls we no need to use single quotes. But while using for html parameters like Title and PlaceHolder we...

Can a placeholder change its color (validate) when the field is required?

validation,placeholder,contact-form

Use the [required] attribute selector to add the color just to required fields. [required]::-webkit-input-placeholder { /* WebKit browsers */ color: red; } [required]::-moz-placeholder { /* WebKit browsers */ color: red; } [required]::-ms-input-placeholder { /* WebKit browsers */ color: red; } <input type="text" placeholder="not required" /> <br> <input type="text" placeholder="required" required/>...

MySQL wildcard replace

mysql,replace,wildcard,placeholder

Using SUBSTRING_INDEX: UPDATE table1 SET column1 = REPLACE( column1, SUBSTRING_INDEX(column1, '/', 2), 'newsite.com' ) WHERE column1 LIKE 'example.com/%/' This should honour your subfolder structure....

DBD::CSV and placeholders

sql,perl,csv,placeholder,dbi

Placeholders can only be used where an expression is expected. What follows LIMIT must be a row count (not an expression), so it can't be a placeholder. #!/usr/bin/perl use warnings; use strict; use DBI qw( ); my $dbh = DBI->connect("DBI:CSV:", undef, undef, { PrintError => 0, RaiseError => 1, }...

HTML Input Forms not displaying entire placeholder text; but includes the quote marks [duplicate]

html,forms,input,placeholder

I fixed your issue and now there are visible all placeholders. Check this: http://cssdesk.com/PWNzt I think that the issue was there that you used ” insetead of "...

Change the placeholder text of an input field after initializing

javascript,jquery,placeholder,mapbox

It wasn't working in your example because jQuery wasn't included. If you don't want to use jQuery, you could use the following: Updated Example document.querySelector('.leaflet-control-mapbox-geocoder-form input').placeholder = "Search for Location"; You can also add an event listener for the ready event and then change the placeholder attribute within the callback....

placeholder with CRLF don't work in Firefox

javascript,jquery,firefox,placeholder

The placeholder attribute The placeholder attribute on <input> and <textarea> elements provides a hint to the user of what can be entered in the field. The placeholder text must not contain carriage returns or line-feeds. Source: https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/Forms_in_HTML So unfortunately I think this can not be done natively. You could however...

Cannot import correctly maven properties with PropertiesFactoryBean and PropertyPlaceholderConfigurer in spring

spring,maven,datasource,placeholder,jrebel

This can happen if you're using resource filtering with JRebel, as the application looks up the bean's xml in its unfiltered form from the project working directory (as per rebel.xml). To resolve this, you'll need to update rebel.xml for that module, adding exclude for that particular XML file - see...

How to set database value to CKEditor placeholder?

database,codeigniter,ckeditor,placeholder

When you are using the CKEditor with the placeholder plugin you may have a text/html email template saved in your database with something like Dear {f_name}, You owe us {money} Euros. The tags {f_name} and {money} are examples and can be the placeholders you want. When you are populating the...

Styling placeholder independently

html,input,placeholder

Yes, but it seems like you will need to use vendor prefixes for now. input { text-align: right; } ::-webkit-input-placeholder { text-align: center; } :-moz-placeholder { /* Firefox 18- */ text-align: center; } ::-moz-placeholder { /* Firefox 19+ */ text-align: center; } :-ms-input-placeholder { text-align: center; } <form> <fieldset> <label>...

ASP.NET MVC5 Font-awesome in placeholder

asp.net,asp.net-mvc,font-awesome,placeholder

This should work for you: @Html.TextBoxFor(m => m.Email, new { @class = "form-control login-input", placeholder = HttpUtility.HtmlDecode("&#xf007; Username or Email"), style = "font-family:Arial, FontAwesome" }) Need to use the font awesome code and add the font family, as well as HtmlDecode the code....

Why do Perl's DBI placeholders break for negative number MySQL queries?

mysql,perl,placeholder,dbi

It is because MySQL is doing a string comparison, and the string "-5" is greater than the string "-3" even though the number -5 is less than the number -3. The behavior you are experiencing is expected, it is not "broken" as you claim. When using a placeholder, the bound...

Python: Eval with undefined variables (2*x+x = 3*x)

python,variables,placeholder

You could use sympy for symbolic computation: In [126]: import sympy as sy In [127]: sy.simplify('2*x+x') Out[127]: 3*x To convert rationals to floats, use sy.nfloat: In [170]: sy.nfloat(sy.simplify('2*3+x+3/4')) Out[170]: x + 6.75 ...

Can I shorten | truncate | crop my CSS file with some kind of placeholder?

css,stylesheet,placeholder

cheers dudes, less/sass it is...

Spring 4 PropertySourcesPlaceholderConfigurer doesn't resolve ${..} placeholders across modules

java,spring,properties,configuration,placeholder

I believe this has to do with how spring works with pre/post processors. Basically you can have duplicated definition or use a different mechanism for loading properties. As much as I know before spring 3.1 duplication is the only way. More on http://www.baeldung.com/2012/02/06/properties-with-spring/#parent-child...

How does one target a placeholder value in a textarea tag using pure javascript

javascript,append,textarea,placeholder

Although I don't quite understand what you want, here's what I think you want: var textarea = document.getElementById('test'); setInterval(function () { textarea.placeholder += ' and on'; }, 1500); <div id="comp"><textarea id='test' placeholder="Write on me now, or else... you will have to watch me write on"></textarea></div> Every 1.5 seconds, and on...

GitHub Markdown - Add current branch name

github,branch,markdown,placeholder

No, I'm not aware of anything like that within READMEs or any other markdown documents when browsing through the source of your project. And nothing turns up when searching their help page either. However, GitHub Pages offers all sorts of info about the repo the document is associated with. Of...

CSS3 expandable search box does not work properly with placeholder

html,css3,transition,placeholder

Try this adding onfocus and onblur attributes to the input: <input type="search" onfocus="placeholder='some text'" onblur="placeholder=''" /> Fiddle: http://jsfiddle.net/dW92N/3/...

::-webkit-input-placeholder does not work [duplicate]

html,css,sass,webkit,placeholder

You can't use it single, only with selector: input::-webkit-input-placeholder { color: #9B9B9B; } input:-ms-input-placeholder { color: #9B9B9B; } input::-moz-placeholder { color: #9B9B9B; } Mixin: @mixin placeholder($selector, $color) { #{$selector}::-webkit-input-placeholder {color: $color} #{$selector}::-moz-placeholder {color: $color} #{$selector}:-ms-input-placeholder {color: $color} } Usage: @include placeholder('.input-class', #FFFFFF); Live example P.S. Do not use them all...

Firefox Placeholder Before CSS selector not working

css,css3,sass,css-selectors,placeholder

The issue is not with the placeholder, but the fact that you are trying to apply a ::before pseudo-element to an input, which isn't supported cross-browser because it's not defined within the standards. See this answer. Since this obviously depends on the form element being [data-required] (although it's not clear...

placeholder is not working with ajax

javascript,php,jquery,ajax,placeholder

You have a space between <textarea> tags, so it is inserted into textarea. If you remove it, you will be able to see a placeholder. $info.='<div class="comment-part" id="commentBox'.$post_id.'"><textarea name="commentq'.$post_id.'" id="commentq'.$post_id.'" class="textarea-style1" placeholder="Comment.." onkeydown="return runScript1(event,\''.$post_id.'\',\''.$cmt_id.'\')"></textarea></div></div>'; ...

How to display placeholder text on focus?

javascript,html5,input,focus,placeholder

You need to show .input-text-container, but your code works. Try this: $('.search.icon-search').on('click',function(e) { e.preventDefault(); $(".input-text-container").show(); $('#textSearch').focus() }); http://jsfiddle.net/3zkpgvj5/...

css tricks for font awesome in placeholder for chrome

html,css,google-chrome,placeholder

Thanks @JDTLH9 for giving me a clue for the problem .actually you dont have to use inline style but in the previous design i was using {font-family:fontawesome}; but when i converted it to this : {font-family:Arial,fontawesome} it worked for me in the chrome....

How to adjust asp placeholder size according to content

javascript,html,css,asp.net,placeholder

use display: none; css instead of visibility:hidden; display: block; to show the element back. visibility controls the visibility but the space is still preserved. But display:none clears the space as if the element was not even there....

Adding Placeholder attributes base on input label with PURE JS - no jQuery

javascript,html,html5,forms,placeholder

var labels = document.querySelectorAll("label"); var i = labels.length; while (i--) { var label = labels.item(i); var text = label.textContent; label.parentNode.classList.contains("required") && (text += "*"); label.nextElementSibling.setAttribute("placeholder", text); } ...

AngularJS: ng-placeholder not working

html,angularjs,placeholder

I don't think there's any ngPlaceholder directive. Try changing your code to: <input type="text" class="form-control" id="Username" name="Username" data-ng-model="user.Username" required="" placeholder="{{user.AdAccount ? 'Username' : 'Ad Login'}}" /> Thas is, change ng-placeholderinto just placeholder, and everything should work fine. (Note also the self-closing slash if you need to conform to valid XHTML.)...

Playing with placeholder in Angular

javascript,html,angularjs,placeholder,angularjs-interpolate

You could directly use interpolation {{}} directive directly in placeholder attribute. Markup <input placeholder="{{betLoader ? 'Risk': ''}}" ng-model="parlayData.win"> Update To update spinner content you could use ng-bind-html there. Html <div> <div ng-bind-html="betLoader ? '<span class="spinner"></span>': 'Win'"><div class="spinner"></div></span> <div ng-show="!betLoader">Win</div> </div> ...

Add Text to option from the label with pure JS

javascript,html5,forms,placeholder

var labels = document.querySelectorAll("label"); var i = labels.length; while (i--) { var label = labels.item(i); var text = label.textContent; label.parentNode.classList.contains("required") && (text += " *"); var nextElement = label.nextElementSibling; // This is what I changed: if (nextElement.tagName == 'SELECT') { nextElement.options[0].text = text; } else { nextElement.setAttribute("placeholder", text); }...

Proper CSS syntax for assigning style attributes to a pseudo-class for multiple classes'?

css,css-selectors,placeholder,pseudo-class

Unfortunately, without making use of a preprocessor (since this is CSS), the best you can do is to group each set of vendor prefixes for both .red-va and .blue-va, but not all of them into a single ruleset: .red-va::-webkit-input-placeholder, .blue-va::-webkit-input-placeholder { color: white; } .red-va:-moz-placeholder, .blue-va:-moz-placeholder { /* Firefox 18-...

Sitecore the Better Placehoder Layout

inheritance,key,sitecore,placeholder

For sure last example. You can have different Group Layouts defined for main tags: <header> -> sc_plh_header <content> -> sc_plh_content -here you can render your grouped layouts explained below. <footer>-> sc_plh_header sc_plh_content sitecore placeholder will have grouped placeholders (sublayouts) based on pages type: content for: Homepage, Sitemap, Article, News, Products,...

HTML Input - already filled in text

html,input,placeholder

The value content attribute gives the default value of the input element. http://www.w3.org/TR/html5/forms.html#attr-input-value To set the default value of an input element, use the value attribute. <input type="text" value="default value"> ...

javax.el.PropertyNotWritableException when using EL conditional operator in value of UIInput

jsf,input,el,placeholder,conditional-operator

Conditional statements in EL are indeed not writable. They are read-only. End of story. The same applies to method references in EL as in #{bean.property()}. It must really be a true value expression as in #{bean.property}. Your approach of using a (HTML5) "placeholder" is actually wrong. For that you should...

Sitecore Update Placeholder Key (Programming)

sitecore,placeholder

See the code below. What it does, it gets rendering references for the selected items, checks their placeholders and rendering names and updates xml value of the __Renderings field of selected item, based on the unique id of selected renderings. Then it fires same code for all descendants recursively. This...

Android studio HINT text design

text,android-studio,placeholder,hint

Just dont use the gravity and use padding left :). <EditText android:layout_width="280dp" android:layout_height="55dp" android:inputType="textEmailAddress" android:ems="10" android:id="@+id/email" android:layout_centerVertical="true" android:layout_centerHorizontal="true" android:background="@drawable/email" android:hint="Email" android:paddingLeft="70dp" /> ...

Center align placeholder in textfield

ios,uitextfield,placeholder

Create and connect IBOutlet to your textField. In YourViewController.m @interface YourViewController () <UITextFieldDelegate> @property (weak, nonatomic) IBOutlet UITextField *txt; In your viewDidLoad self.txt.delegate=self; self.txt.textAlignment=NSTextAlignmentCenter; Write this delegate method..this method calls everytime when text in text field changes. - (BOOL) textField: (UITextField *)theTextField shouldChangeCharactersInRange: (NSRange)range replacementString: (NSString *)string { NSRange textFieldRange...

Get placeholder within gsub from array to print

ruby,regex,placeholder

Here is a solution without reexp: str = "\\c 2 foo \\v 1 bar \\v 2 foo \\v 3 bar " + "\\v 4 foo \\c 3 bar \\v 1 foo \\v 2 bar" x = str.split.slice_before('\c').map do |c_token,chapter,*rest| [c_token,chapter]+rest.map.with_index do |x,ix| if rest[ix-1] == '\v' chapter+':'+x else x end...

Powerpoint - Bind character-size formatting of side-by-side placeholders to each other

formatting,powerpoint,placeholder,powerpoint-2010

Use one of the layouts that provides two columns of text (Two Content or Comparison). Or add your own text box, set it to two columns and to auto-fit text to placeholder. Otherwise, you'd need to add code to trap the selection change event, and if the previous selected shape...

WPF | VB .Net || Textbox Placeholder

wpf,vb.net,xaml,textbox,placeholder

There's nothing wrong with a XAML only solution. <Style TargetType="TextBox" BasedOn="{StaticResource {x:Type TextBox}}" x:Key="TextBoxWithWatermarkStyle"> <Setter Property="Padding" Value="3"/> <Setter Property="Background" Value="White"/> <Setter Property="Foreground" Value="Black"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="TextBox"> <Border BorderThickness="1" CornerRadius="1" Background="{TemplateBinding Background}"> <Grid>...

Underline single letter in an input placeholder

css,placeholder,underline

I think you can achieve this with CSS only in google chrome. For example: You can select the first letter of placeholder ::-webkit-input-placeholder::first-letter { color: red; text-decoration:underline; } Result: The text-decoration does not render when set with :first-letter in Chrome (Version 39.0.2171.71). So we can achieve the underline with border-bottom....

UITextField PlaceHolder Color change Monotouch

c#,ios,monotouch,uitextfield,placeholder

Just simplify what you already have :-) This works on iOS7: var t = new UITextField() { AttributedPlaceholder = new NSAttributedString("some placeholder text", null, UIColor.Red) } ...