if i want that my textarea will be hidden how i do it
+2
A:
Using css: display: none;
(this will make the textarea disappear completely, the space it would normally take up will not be reserved)
Rune
2010-03-02 10:48:01
i have this code <textarea name=text cols=20 rows=10>how do i set this to be hidden
nisnis84
2010-03-02 10:52:39
You could add style="display: none". As @thelost says, you could also do style="visibility: hidden". This will make the textarea still take up space on the page. You should really put this in a style sheet. That would mean adding class="hidden" to your textarea-tag and adding textarea.hidden { display: none; } to your css file
Rune
2010-03-02 10:53:47
A:
You have a few options, here are some examples:
- Display:none
- Visibility:hidden
Here is some example code for you to see for yourself
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Text Area Hidden</title>
<style type="text/css">
.hideButTakeUpSpace
{
visibility: hidden;
}
.hideDontTakeUpSpace
{
display:none;
}
</style>
</head>
<body>
<h1>Text area hidden examples</h1>
<h2>Hide but take up space (notice the gap below)</h2>
<textarea class="hideButTakeUpSpace" rows="2" cols="20"></textarea>
<h2>Hide Don't take up space</h2>
<textarea class="hideDontTakeUpSpace" rows="2" cols="20"></textarea>
</body>
</html>
Alex Key
2010-03-02 10:53:14
+2
A:
Everyone is giving you answers, but not much on the reasons. Here you go: if you use the CSS rule visibility:hidden;
the text area will be invisible, but it will still take up space. If you use the CSS rule display:none;
the textarea will be hidden and it won't reserve space on the screen--no gaps, in other words, where it would have been. Here's a good visual example: http://www.w3schools.com/css/css_display_visibility.asp
To put the style rule in your textarea, you want something like this:
<textarea cols="20" rows="20" style="display:none;">
D_N
2010-03-02 10:53:23