0

how to change the color for the text inside the text box...... gave the color property but its not working....

providing my code and fiddle below

http://jsfiddle.net/Zkdfq/1/embedded/result/

<form class="navbar-form pull-right">
              <input class="span2" type="text" placeholder="Email">
              <input class="span2" type="password" placeholder="Password">
              <button type="submit" class="btn">Sign in</button>
            </form>
BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
user1365117
  • 19
  • 1
  • 9

1 Answers1

0

Just add:

input[type="text"] {
    color:red;
}

somewhere after the bootstrap.css to override it. The placeholder text will not change, but once you enter text it will.

Or if you only want it to affect the nav bar:

.navbar-form input[type="text"] {
    color:red;
}
DeweyOx
  • 719
  • 5
  • 14
  • i updated in the fiddle its not changing...onlty the cursor changing into red color....if i need to change the already existing text inside the text box how to change it....http://jsfiddle.net/syznm/ – user1365117 Feb 05 '13 at 01:48
  • Like I said, it will not change the placeholder text, but you can with vendor prefixes. See http://stackoverflow.com/questions/2610497/change-an-inputs-html5-placeholder-color-with-css for some code. – DeweyOx Feb 05 '13 at 01:51
  • http://jsfiddle.net/syznm/1/ - BTW, this code needs some serious cleaning / organizing to make work well. The page is terribly slow. I'd use YSlow or Chrome's developer tools to give you hints on what could be done to improve - the list is long. – DeweyOx Feb 05 '13 at 14:08
  • can you tell how to improve the speed – user1365117 Feb 05 '13 at 14:33
  • Use Chrome and right click on your page. Select "Inspect Element". From the window that appears, select "Audits". Then, "Reload Page and Audit on Load" and "Run". That should tell you everything. – DeweyOx Feb 05 '13 at 17:43