Help Applying CSS to Form Fields

Guys

I have this form, I want to define a 2px orange border around the form fields and maybe make the search button orange and a bit 3d using CSS:

<div class='searchform'>
  <form name='search' action='<?php print $config_baseHREF ?>search.php'>
    <input type='text' name='q' id='q' size='35' value='<?php print (isset($q)?$q:""); ?>' />
    <input type='submit' value='<?php print translate("Search"); ?>' />
  </form>
</div>
  • How do I address this particular form on the stylesheet?

  • I’m thinking of using code similar to the below, so how do I apply it to this particular form? Thanks.

input
{
color: #781351;
background: #fee3ad;
border: 1px solid #781351
}

Thanks guys

It’s signs that you are improving :).

The way you have it now all the input fields in your website will have a border and a background color. You have to make classes to accomplish this i.o.w. something like:


.input {
    border: 1px solid #781351; color: #781351;
}

.button {
    background: #fee3ad;   
}


  <form name='search' action='<?php print $config_baseHREF ?>search.php'>
    <input type='text' name='q' id='q' size='35' class='input' value='<?php print (isset($q)?$q:""); ?>' />
    <input type='submit' class='button' value='<?php print translate("Search"); ?>' />
  </form>
</div>

<div class=‘searchform’>

OK, so I got it:

.searchform input     {
color: #781351;
background: #fee3ad;
border: 1px solid #781351
}

I suppose it was a basic question. Is answering your own questions the first sign of madness?? :lol:

Rgds