Reputation: 557
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?
Upvotes: 12
Views: 119067
Reputation: 1
I know the question is old, but I had a similar issue and it took some time to resolve it.
This line was not working:
lines_with_strong = [re.sub(r'Titel: (.+)', r'<strong style=color: darkblue;>Titel: \1</strong>', line) for line in lines]
But this line is:
lines_with_strong = [re.sub(r'Titel: (.+)', r'<strong style=color:
darkblue;>Titel: \1</strong>', line) for line in lines]
You can barely spot the difference (AI didn't), but in the first one there is a space between color: and darkblue and it had to be removed. So maybe this would also solve the problem of the thread.
Upvotes: 0
Reputation: 1167
I've just solved my personal version of this problem. The symptom was the same as for others here - everything within the brackets was implemented except for the color.
I was able to get it working simply by changing my color value from a hex format to a color-word.
color:#ffa500;
to
color:orange;
did the trick.
BTW: Had tried the hex color with and without quote signs, didn't change anything.
Upvotes: 1
Reputation: 2654
Try using:
color: #c02537 !Important;
If it does not solve your issue then that means this color attribute is overwritten by your default link color.
Use Browser Plugins like Firefox FireBug and verify which CSS styles are applied and which style is overwriting your color.
Hope this helps
Upvotes: 3
Reputation: 8477
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
Upvotes: 8
Reputation: 1788
You can use inheritance in CSS instead of using !important
:
#search table td {
color: #c02537;
}
Upvotes: 2