CSS font color does not change

I am making a php / mysql site and should do a search bar:

CSS code:

#search{ color: #c02537; width:80%; margin: 20px auto; padding: 20px 20px; background: rgba(197,101,29,0.6); border-radius: 0 15px 0 15px; -moz-border-radius: 0 15px 0 15px; -webkit-border-radius: 0 15px 0 15px; } #searchf{ margin:0 auto; width: 80%; } 

Relevant HTML:

 <div id="search"> <form method="post" action="index.php" name="search" id="searchf"> <table> <tr> <td>Food Category: <input type="text" name="food_category" id="searchfc"/> </td> <td>City: <input type="text" name="city" id="searchfc"/> </td> </tr> </table> </form> </div> 

CSS padding applies the attributes of margins, paddings, and borders, but not color.

I have no idea why it is not working. Does anyone have any clues?

+4
source share
4 answers

The color of the td table can override the color property #search . Try setting td's color

 #search table td { color: #c02537; } 

If you want to change the color of the input elements, try the following:

 #search table td input { color: #c02537; } 

Work DEMO

+4
source

Have you tried this?

 color: #c02537 !important; 
+4
source

You can use inheritance in css insted using !important :

  #search table td {
     color: # c02537;
 }
+1
source

Try using:

 color: #c02537 !Important; 

If this does not solve your problem, then this color attribute is overwritten by default by default.

Use browser plugins like Firefox FireBug and check which Css styles are applied and which style rewrites your color.

Hope this helps

0
source

All Articles