Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

0009382

Suspended
Original poster
Jan 9, 2010
119
0
Hi, I'm wondering if I can preset the size of a text form and make it non-resizeable. Would anyone know the answer?

Thanks in advance.
 
There's an attribute "size" for input tag to determine the preset width and "cols" for textarea. I believe a "resize: none" CSS rule will stop browsers from allowing it to be resizable.
 
There's an attribute "size" for input tag to determine the preset width and "cols" for textarea. I believe a "resize: none" CSS rule will stop browsers from allowing it to be resizable.

Sorry, but I don't really understand, I only have basic knowledge of Dreamweaver, and I sort of know CSS a bit, enough to position images and style text and what not. Some of the CSS tags in the list I don't even know what they mean. I understand when you say resize: none, but I don't understand when you say "attribute size for input tag".

-Caleb
 
For textarea:
Code:
<textarea cols="13" rows="4"></textarea>
Playing around with those numbers help you adjust your size of it (which also depends on the font you set of on textarea)
 
For textarea:
Code:
<textarea cols="13" rows="4"></textarea>
Playing around with those numbers help you adjust your size of it (which also depends on the font you set of on textarea)

Hey I messed around with what you said, and it looks great after I got it how I wanted. Now I'm going to Google what the css tag for that resize property is, because it's not in the CS5 List for properties. If you'd like to post the code for that one to that'd be great, but otherwise, thanks a lot for the help.

-caleb
 
Code:
textarea { resize: none; }

Hey there, that looks easy, but this is how I figured it out after awhile of experimenting:

<textarea name="Terms of Use" cols="90" rows="20" disabled="disabled" readonly="readonly" class="nosize-text" id="Terms of Use" height="200" resize="none">
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.