Solved

textarea size

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

WordPress Tutorial 1: Installation & Setup

WordPress is a very popular option for running your web site and can be used to get your content online quickly for the world to see. This guide will walk you through installing the WordPress server software and the initial setup process.

Question has a verified solution.

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

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
This article discusses how to implement server side field validation and display customized error messages to the client.
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

636 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