Solved

textarea size

Posted on 2013-06-24
5
294 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 109

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

803 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