0

I am trying to change the background color of various input fields, I try the following and it works nice

input[type="text"], textarea {

  background-color : #d1d1d1; 

}

but I am wondering why it didn't when I am trying it with class selector:

.inputfields {

  background-color : #d1d1d1; 

}

my html is

<div class="container" >
      <div class="row-fluid" >
          <div class="span8" id="MyProfile">
            <form action="" method="post" id="registerform">
              <p>
                <label for="username">Username</label>
                <input class="inputfields" type="text" name="username" id="username" />
              </p>

              <p>
                <label for="slider" id="agelabel">Age</label>
                <div class="inputfields" id="Ageslider" onclick=""></div>
              </p>

              <p>
                <label for="email">Email</label>
                <input class="inputfields" type="text" name="email" id="email" />
              </p>
              </form>
              </div>
          </div>
      </div>
    </div>
Avraam Mavridis
  • 8,698
  • 19
  • 79
  • 133
  • Here you go : http://stackoverflow.com/questions/3540380/how-can-i-apply-css-on-all-buttons-which-are-present-in-that-page – developers-have-no-vacation Feb 12 '14 at 10:23
  • It works in JSFiddle. I don't know about you. – MadeOfAir Feb 12 '14 at 10:25
  • Which browser? This works in FF. – Kevin Bowersox Feb 12 '14 at 10:25
  • as the id suggest `Ageslider` its clearly u use plugins, so they rip off the class names. that why its not working for you. try to read in the specific docs for that plugin how to preserve or create new class names for the elements. – JohnnyJS Feb 12 '14 at 10:27
  • if you provide the name of that plugin/framwork of that slider / WYSIWYG we might be helpful ;) – JohnnyJS Feb 12 '14 at 10:36
  • @Avraam it is also possible that if you use a grid framework that is providing default styles for input-fields, you have to be more specific with your CSS. Since you have to override the frameworks defaults. – Nico O Feb 12 '14 at 10:38
  • @JohnnyJS I am using bootstrap and JQuerry, but anyway is not something to important, I just wondering why it doesn't work – Avraam Mavridis Feb 12 '14 at 10:48

0 Answers0