Solved

textarea size

Posted on 2013-06-24
5
297 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 110

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

SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

Question has a verified solution.

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

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Many old projects have bad code, but the budget doesn't exist to rewrite the codebase. You can update this code to be safer by introducing contemporary input validation, sanitation, and safer database queries.
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…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

738 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