Jump to content

Setting font type within a "textarea"


mattyd

Recommended Posts

I am attempting to set all font-type to Arial on a simple submission page I've created. So far this has been easy and worked for the majority of the displayed and some entered text but the primary "textarea" will not display in Arial. Below is a link to the actual page as well as the PHP/CSS.

 

Thank-you in advance for any help,

Matty

 

http://bluelinedown.netau.net/index.php

 

 

<?php
include 'connection.php';

$query = "SELECT * FROM people";

$result = mysql_query($query) or die(mysql_error());

while ($person = mysql_fetch_array($result)){

        echo  $person ['name'];
echo  $person ['descrip'];
}
?>

</br >
<img src="reviewBanner.jpg" alt=""/>
</br >


<form action="create.php" method="post">
     <span style='font-size:14px;font-family: "Arial";color:black;position:absolute;right:1228px;'>Subject</span>
     <span style='font-size:14px;font-family: "Arial";color:black;position:absolute;right:1073px;'><input type="text" name="inputName" value=""/></span>
     </br >
     <span style='font-size:14px;font-family: "Arial";color:black;position:absolute;right:1230px;top:185;'>Review</span> 
     <span style='font-size:14px;font-family: "Arial";color:black;position:absolute;right:785px;top:185;'><textarea cols="50" rows="4" name="inputDesc" value=""/></textarea></span>
     </br >
     <span style='font-size:14px;font-family: "Arial";color:black;position:absolute;right:1160px;top:280;'><input type= "submit" name= "submit" value="Submit"/></span>

 

 

*Note: The offending area on the web page is beside the "Review" label.  The line of code dealing with this is:

 

<span style='font-size:14px;font-family: "Arial";color:black;position:absolute;right:785px;top:185;'><textarea cols="50" rows="4" name="inputDesc" value=""/></textarea></span>

 

Link to comment
https://forums.phpfreaks.com/topic/222757-setting-font-type-within-a-textarea/
Share on other sites

Put this in your CSS file or code...

 

.txtarea { font-family: arial; }

 

Then simply add the class to your textarea html...

<textarea cols="50" rows="4" name="inputDesc" value="" class="txtarea"></textarea>

 

That should work fine.

Thanks for your reply  :)

 

I did as you said.  Currently I am not using a separate CSS file (the page is still in a rough state and I will convert to a separate page sometime soon).

 

I added

 

.txtarea { font-family: arial; }

 

directly into the code and it showed up on the page-- I guess I misunderstand.

 

Thanks for your help.

Matty

Thanks for your reply  :)

 

I did as you said.  Currently I am not using a separate CSS file (the page is still in a rough state and I will convert to a separate page sometime soon).

 

I added

 

.txtarea { font-family: arial; }

 

directly into the code and it showed up on the page-- I guess I misunderstand.

 

Thanks for your help.

Matty

Just whip it in <style type="text/css">...</style> in the head section of the webpage.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.