Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CSS Font color not changing

Tags:

html

css

I am making a php/mysql site and have to make a search panel:

The CSS Code is:

#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%;
}

Corresponding HTML is:

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

The CSS fill is applying the margins, padding and border attributes but not the color.

I have no idea why it is not working. Anybody have clues?

like image 244
Javeria Habib Avatar asked Mar 09 '26 14:03

Javeria Habib


2 Answers

The table's td color might be overriding the color property of #search. Try this to specifically color the td's

#search table td {
  color: #c02537;
}

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

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

Working DEMO

like image 199
Pranav 웃 Avatar answered Mar 11 '26 02:03

Pranav 웃


Have you tried this?

color: #c02537 !important;
like image 29
torp3d0 Avatar answered Mar 11 '26 04:03

torp3d0



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!