Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

textarea size

Posted on 2013-06-24
5
Medium Priority
?
302 Views
Last Modified: 2013-06-29
I cant set the width of a textarea with php as the display has the same col widht no matter what i set it to. I can resize the textbox with a mouse manually after load which is no good to me.


$colsize=100;

echo "<form action='displayForm2.php' method='post'>";
      echo "Value1: <textarea rows='1' cols=" . $colsize . " name='2one' value=>test</textarea><br>";
      echo "Value1: <textarea rows='3' cols='50' name='one' value=>" . $one  ."</textarea><br>";
0
Comment
Question by:jagguy
  • 3
5 Comments
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 39273706
did you check the output after loading the cols value?

it should be,

 echo "Value1: <textarea rows='1' cols=100 name='2one' value=''>test</textarea><br>";
0
 

Author Comment

by:jagguy
ID: 39273732
no this didnt work.
I have all  text areas displayed  with same width when I set them with different widths.

This is in a bootstrap span and the textarea  size it fixed at 200px. I cant change this.
0
 

Accepted Solution

by:
jagguy earned 0 total points
ID: 39273750
I need to set this in css

 .textareawidth {width:400px;}
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 39274584
Yes, it's a CSS function, not a PHP function.

PHP and MySQL are server-side technologies.  Upon receipt of the request, they run and their work is complete before the response is sent.

HTML, CSS and JavaScript are client-side technologies.  They are sent from the server in the response to the HTTP request.  HTML provides semantic markup (giving meaning to elements of the page).  CSS provides visual styling.  JavaScript provides client-side automation.
0
 

Author Closing Comment

by:jagguy
ID: 39286440
last post
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

When crafting your “Why Us” page, there are a plethora of pitfalls to avoid. Follow these five tips, and you’ll be well on your way to creating an effective page.
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

885 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