PHP contact form font color is stuck to black

Posted by Richard Hayward on Stack Overflow See other posts from Stack Overflow or by Richard Hayward
Published on 2011-07-09T06:23:03Z Indexed on 2012/06/15 15:16 UTC
Read the original article Hit count: 386

Filed under:
|
|
|

No matter what i try strangely enough my form and thank you page both php files one with embed font coloring and one with an external style sheet refuse to change font color from black.

thank you php file: http://www.richiesportfolio.com/contact/thank-you.php

contact form php file: http://www.richiesportfolio.com/contact/contactform.php

Everything else works purfectly but changing the contact forms font color

contactform.php

`

<?PHP

require_once("./include/fgcontactform.php");

$formproc = new FGContactForm();


if(isset($_POST['submitted']))
{
   if($formproc->ProcessForm())
   {
        $formproc->RedirectToURL("thank-you.php");
   }
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en-US" lang="en-US">
<head>
      <meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
      <title>Contact us</title>
      <link rel="stylesheet" type="text/css" href="http://www.richiesportfolio.com/contact/contact.css" />
      <script type='text/javascript' src='scripts/gen_validatorv31.js'></script>
</head>
<body>

<!-- Form Code Start -->
<form id='contactus' action='<?php echo $formproc->GetSelfScript(); ?>' method='post' accept-charset='UTF-8'>
<fieldset >
<legend>Contact Me</legend>

<input type='hidden' name='submitted' id='submitted' value='1'/>
<input type='hidden' name='<?php echo $formproc->GetFormIDInputName(); ?>' value='<?php echo $formproc->GetFormIDInputValue(); ?>'/>
<input type='text'  class='spmhidip' name='<?php echo $formproc->GetSpamTrapInputName(); ?>' />

<div class='short_explanation'>* required fields</div>

<div><span class='error'><?php echo $formproc->GetErrorMessage(); ?></span></div>
<div class='container'>
    <label for='name' >Your Full Name*: </label><br/>
    <input type='text' name='name' id='name' value='<?php echo $formproc->SafeDisplay('name') ?>' maxlength="50" /><br/>
    <span id='contactus_name_errorloc' class='error'></span>
</div>
<div class='container'>
    <label for='email' >Email Address*:</label><br/>
    <input type='text' name='email' id='email' value='<?php echo $formproc->SafeDisplay('email') ?>' maxlength="50" /><br/>
    <span id='contactus_email_errorloc' class='error'></span>
</div>

<div class='container'>
    <label for='message' >Message:</label><br/>
    <span id='contactus_message_errorloc' class='error'></span>
    <textarea rows="10" cols="50" name='message' id='message'><?php echo $formproc->SafeDisplay('message') ?></textarea>
</div>


<div class='container'>
    <input type='submit' name='Submit' value='Submit' />
</div>

</fieldset>
</form>
<!-- client-side Form Validations:
Uses the excellent form validation script from JavaScript-coder.com-->

<script type='text/javascript'>
// <![CDATA[

    var frmvalidator  = new Validator("contactus");
    frmvalidator.EnableOnPageErrorDisplay();
    frmvalidator.EnableMsgsTogether();
    frmvalidator.addValidation("name","req","Please provide your name");

    frmvalidator.addValidation("email","req","Please provide your email address");

    frmvalidator.addValidation("email","email","Please provide a valid email address");

    frmvalidator.addValidation("message","maxlen=2048","The message is too long!(more than 2KB!)");

// ]]>
</script>

</body>
</html>`

contact.css

body,table,tr,td,a,p,h1,h2,h3,h4,h5,input,h3 a,h4 a,h5 ul, li, ul, a  {
   color:#FFF;
}

#contactus fieldset {
   width:320px;
   padding:20px;
   border:20px;
   -moz-border-radius: 10px;
   -webkit-border-radius: 10px;
   -khtml-border-radius: 10px; border-radius: 10px;
}

#contactus legend, h2 {
   font-family : Arial, sans-serif;
   font-size:1.3em;
   font-weight:bold;
   color:#FFF;
}

#contactus label {
   font-family : Arial, sans-serif;
   font-size:0.8em;
   font-weight: bold;
   color:#FFF;
}

#contactus input[type="text"],textarea {
   font-family : Arial, Verdana, sans-serif;   font-size: 0.8em;  
   line-height:140%;
   color : #000;   
   padding : 3px;
   border : 1px solid;
   #999;
   -moz-border-radius: 5px;
   -webkit-border-radius: 5px;
   -khtml-border-radius: 5px;
   border-radius: 5px; 
}

#contactus input[type="text"] {
   height:18px;
   width:220px;
   -webkit-border-radius: 5px;
   -moz-border-radius: 5px;
   border-radius: 5px;
}

#contactus #scaptcha {
   width:60px;
   height:18px;
}

#contactus input[type="submit"] {
   width:100px;
   height:30px;   
   padding-left:0px;
   -webkit-border-radius: 5px;   -moz-border-radius: 5px;    border-radius: 5px;    }

#contactus textarea {
   height:120px;
   width:310px;
   -webkit-border-radius:8px;
   -moz-border-radius: 8px;   
   border-radius: 8px;
}

#contactus input[type="text"]:focus,textarea:focus {
   color : #009;
   border : 1px solid #990000;
   background-color : #ffff99;
   font-weight:bold;
}

#contactus .container {
   margin-top:8px;
   margin-bottom:10px;
   color:#FFF;
}

#contactus .error {
   font-family: Verdana, Arial, sans-serif;    
   font-size: 0.7em;    color: #900;   
   background-color : #111;
}

#contactus fieldset#antispam {
   padding:2px;
   border-top:1px solid #EEE;
   border-left:0;
   border-right:0;
   border-bottom:0;   
   width:350px; }

#contactus fieldset#antispam legend {
   font-family : Arial, sans-serif;   
   font-size: 0.8em;
   font-weight:bold;
   color:#FFF;
}

#contactus .short_explanation {
   font-family : Arial, sans-serif;   
   font-size: 0.6em;
   color:#FFF;
}

/* spam_trap: This input is hidden. This is here to trick the spam bots*/
#contactus .spmhidip {
   display:none;
   width:10px;   
   height:3px;
}
#fg_crdiv {
   font-family : Arial, sans-serif;
   font-size: 0.3em;   
   opacity: .2;
   -moz-opacity: .2;   
   filter: alpha(opacity=20);
}
#fg_crdiv p {
   display:none;
}

© Stack Overflow or respective owner

Related posts about php

Related posts about forms