Solved

adjusting color inside woocommerce product search form field

Posted on 2013-06-25
6
1,085 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 23

Expert Comment

by:tailoreddigital
ID: 39275313
0
 

Author Comment

by:COwebmaster
ID: 39275438
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 110

Assisted Solution

by:Ray Paseur
Ray Paseur earned 250 total points
ID: 39276074
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
Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

 

Author Comment

by:COwebmaster
ID: 39276433
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
ID: 39276466
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
ID: 39276492
That worked, thanks!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
bootstrap form validations! 1 40
change site header 8 31
Best hashing method? 1 20
futuristic wordpress theme 2 14
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

739 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