Solved

adjusting color inside woocommerce product search form field

Posted on 2013-06-25
6
955 Views
Last Modified: 2013-06-25
Hi there.  I am building a site and using the woocommerce framework.  I have changed the inside coloring of the form product search field but need to change out the color inside that text field.  I've tried the following but it's not working:

#s {
background-color: #D6B874;
color: #000000;
}

My link is here: http://149.47.192.189/

Any ideas experts?
0
Comment
Question by:COwebmaster
6 Comments
 
LVL 23

Expert Comment

by:tailoreddigital
Comment Utility
0
 

Author Comment

by:COwebmaster
Comment Utility
tried that but nothing worked.  I have in there:

#s {
background-color: #ff0000;
}

input, select, textarea{
    color: #ff0000;
}

textarea:focus, input:focus {
    color: #ff0000;
}
0
 
LVL 108

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 total points
Comment Utility
This shows how to attach the styling to the id attribute of the search box.  Please see: http://www.laprbass.com/RAY_temp_cowebmaster.php

<?php // RAY_temp_cowebmaster.php
error_reporting(E_ALL);

// CSS STYLING FOR INPUT FIELDS

// CREATE OUR WEB PAGE IN HTML5 FORMAT
$htm = <<<HTML5
<!DOCTYPE html>
<html dir="ltr" lang="en-US">
<head>
<meta charset="utf-8" />
<title>HTML5 Page in UTF-8 Encoding</title>

<style type="text/css">
#search_field {
    background-color:green;
    color:orange;
}
</style>

</head>
<body>
<div id="search" class="grid_6 prefix_18">
<form action="http://149.47.192.189/" method="get">
<div class="search_box">
<input id="search_field" name="s" type="text" class="inputbox_focus blur pngfix" value="Search..." />
<input type="submit"  value="" class="search-btn pngfix" />
</div>
</form>
</div>
</body>
</html>
HTML5;

// RENDER THE WEB PAGE
echo $htm;

Open in new window

By way of explanation, the # is used in the style sheet to attach style to an id= attribute.   The . (dot) is used to attach style to a class.  Each document can have many duplicate class names, but id names must be unique.

This will get much easier if your document validates correctly!
http://validator.w3.org/check?uri=http%3A%2F%2F149.47.192.189%2F&charset=%28detect+automatically%29&doctype=Inline&group=0
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 

Author Comment

by:COwebmaster
Comment Utility
Okay, i've had to use this to get the text color to change when the mouse clicks inside the textfield:

#searchform #s {
background-color: #D6B874;
color: #000;
}

However, what can I add to the editor so that the text color is also #000? Right now it appears gray.
0
 
LVL 4

Accepted Solution

by:
ScorchD earned 250 total points
Comment Utility
You need to style the placeholder text specificaly for that so

::-webkit-input-placeholder {color: #000;}
:-moz-placeholder {color: #000;}
::-moz-placeholder {color: #000;}
:-ms-input-placeholder {color: #000;}

Open in new window

0
 

Author Closing Comment

by:COwebmaster
Comment Utility
That worked, thanks!
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The purpose of this video is to demonstrate how to set up the permalinks on a WordPress Website. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Go t…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now