4

I'm using the placeholder attribute on input fields like they do in my Bootstrap examples, but it doesn't show up in my of my elements. Am I missing something? Is there some doctype that I'm missing? I'm using it like in the examples on Boostrap, seemingly a simple attribute, but nothing shows up.

<!doctype html> <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" lang="en"> <![endif]--> <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8" lang="en"> <![endif]--> <!--[if IE 8]> <html class="no-js lt-ie9" lang="en"> <![endif]--> <!--[if gt IE 8]><!--> <html class="no-js" lang="en"> <!--<![endif]--> <head> <meta charset="utf-8"> <form class="form-search"> <input type="text" class="input-medium search-query" placeholder="Search by Tag"> <button type="submit" class="btn btn-primary">Search</button> </form> 
9
  • This might be a silly question, but did you add the bootstrap css file ? Commented Apr 30, 2012 at 17:17
  • Not a silly question, and yes, everything else on the page looks fine. Commented Apr 30, 2012 at 17:20
  • Doesn't show on any browser? Which ones are you testing with? It seems alot of people have problem with placeholder on older IE browsers. Commented Apr 30, 2012 at 17:38
  • Any of them - FF11, newest Chrome, IE9. But it shows on the Bootstrap demo pages. That's why I think maybe it's a doctype issue? Commented Apr 30, 2012 at 17:43
  • 1
    @bluedevil2k works fine for me, can you post a link to your site or port your code to a jsfiddle.net so we can take a look? Commented Apr 30, 2012 at 18:04

1 Answer 1

4

My stupidity is to blame as usual - I was using one of those "downloadable Bootstrap themes", and this particular theme set the placeholder to #ffffff and the background on inputs to #ffffff.

Sign up to request clarification or add additional context in comments.

1 Comment

I was facing the same problem but when i checked the theme the placeholder color was set to #ffffff. :D , Thanks

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.