Solved

adjusting color inside woocommerce product search form field

Posted on 2013-06-25
6
1,105 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
 

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

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

Question has a verified solution.

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

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.
Introduction This article is intended for those who are new to PHP error handling (https://www.experts-exchange.com/articles/11769/And-by-the-way-I-am-New-to-PHP.html).  It addresses one of the most common problems that plague beginning PHP develop…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

690 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