Solved

textarea size

Posted on 2013-06-24
5
292 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 108

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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
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 basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

747 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now