[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

adjusting color inside woocommerce product search form field

Posted on 2013-06-25
6
Medium Priority
?
1,204 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 111

Assisted Solution

by:Ray Paseur
Ray Paseur earned 1000 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
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

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 1000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
The viewer will learn how to count occurrences of each item in an array.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses

656 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