Hello All,

I am pretty new to Drupal 1-2 weeks and trying to figure this out. I am using a custom theme but their is a slight problem. When they created the theme they made the string "Search this website" test near the search field the same color as the background. So, I said no problem I'll go into the style.css and change this and did so. However, when I done this it makes the text that asks questions when submitting comments or blogs the same color as the other background 'white' and therefore it cannot be seen by other users including myself unless you highlight it.

So my question is:

Is there anything to put code into a CSS to set a specific string of text on the site to a different color? I don't know CSS coding at all but I understand how to edit and change a existing one. I am wondering if there is some kind of clause I can enter to allow a string "Search this site" and set it to color 'fff' (white) but continue using blue for other text.

This seems kind of complicated when I explain it so if no one understands what I am asking let me know and I will go into better details if I can.

Thank you so much for the support.

Regards,
Andy

Comments

abelleba’s picture

Sorry for the typeo test is text.

Here is the example on my site:

http://www.computerquestionhelp.com look at the top right.

The code in the css to change this is.

.form-item {
  margin-top: 1em;
}
.form-item label {
  color: #000;
}
.item-list .title {
  color: #369;
  font-size: 0.85em;

if I change 000 to fff to make it white, then the end result is it also changes the color of the text:
Comment Subject:
Comment Message:

And some other text in the admin pages to also be white. This causes a problem as you can see the background on the actual pages is white. Therefore, white text on white background.

What I want is for the code above to remain 000 black, but the "Search this site" string next to the search field to be white.

root@spartan [/home/abelleba/public_html/computerquestionhelp.com]# grep "Search this site" -r *
modules/search/search.module:    '#title' => t('Search this site'),

This shows where the file that holds that text, but I tried entering a font code and this obviously didn't work out.

Any ideas?

3cwebdev’s picture

To change the color of the Search field text add a new CSS rule to your style.css file:

#search label {color: #000}

This should only effect that one element.

The Cosmic Gift | Complete Computer Care | Team Hope

abelleba’s picture

#search label {color: #000}

This worked like a charm! Now I know 1 more thing about css editing. Thank you all for your replies I appreciate it greatly!

Regards,

EllECTRONC’s picture

Try to go deeper and use this:
#search-theme-form .form-item label

And if u don't know CSS ... I just can tell u one Russian Secret for beginner - u need FireFox+ Web Developer + Firebug!
And Investigate ur site!

P.S.: Наслаждайся детка!

zeta ζ’s picture

You should set color & background-color in the same place, to ensure that you always have a combination that is effective ie. visible! even if they are updated in the future.

For example: You have a block in a column on a page, and the whole page is black text on white. If you now set the block to be blue text, this seems to be fine. But if, later, you set the column to be white text on blue, the previous mistake is revealed.
___________________
It’s in the detaιls…

demonstration portfolio