Click to See Complete Forum and Search --> : Help Changing font in php


klturi421
04-13-2009, 08:01 PM
I am having trouble changing the font, size and color of my contact form. I am new to php and just wondering what it is I need to do or change to get it to work. I was trying to use CSS but it didnt change anything other than the background of the page.

In my css all I have is font family and size attributes.


<?php
if(isset($_POST['submit'])) {

$to = "test@test.com";
$subject = "Form Tutorial";
$name_field = $_POST['name'];
$email_field = $_POST['email'];
$message = $_POST['message'];

$body = "From: $name_field\n E-Mail: $email_field\n Message:\n $message\n";

echo "Your email has been sent!";
mail($to, $subject, $body);

} else {
echo "blarg!";
}
?>



<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Language" content="en-us">
<link href="contact.css" rel="stylesheet" type="text/css" />
</head>

<div class="contact">
<form method="POST" action="mailer.php">
Name:
<input type="text" name="name" size="25"><br>
<br>
E-Mail:
<input type="text" name="email" size="25"><br>
<br>
Message:<br>
<textarea rows="9" name="message" cols="30"></textarea><br>
<br>
<input type="submit" value="Submit" name="submit">
</form>
</div>
</html>

bradgrafelman
04-13-2009, 08:40 PM
Font sizes have nothing to do with PHP; PHP doesn't know what a font size is, let alone how to change it. The contact form is just plain HTML.

What did you put in contact.css to try and change the font sizes?

klturi421
04-13-2009, 10:28 PM
This is what I have. Even with the HTML pointing to the CSS page it doesn't change any of the text attributes just the background and positioning are the only results I have seen.

As you can see I have been trying several variations and I still get nothing




body{
Background:#gray;
width:100px;
line-height:35px;
}

#contact{
font-family:Arial,sans-serif;
font-size:25pt;
}

.text{
font-size:25pt;
font-family:Arial;
color:#white;
}