Reputation: 8387
My Textarea
appearance will be changed after I clicked inside it. This will happens in google-chrome
, Safari
. Also it displays a scroll bar when the page gets loaded in Opera
.
I don't want the change in the appearance.
Before clicking in Textarea
,
After clicking in Textarea
,
Also in opera
, Textarea looks with scroll bar,
How to disable this scroll bar in opera
? Its will happens in opera when the page gets loaded.
My jsp
will be,
<div id="messageArea">
<table border="0" width="95%">
<tr>
<td id="msgvalue" style="width:91%;border-color: #6495ED;border-style: solid;border-width: 1px;">
<textarea id="message" onkeypress="javascript:message_onkeypress(event);" ></textarea></td>
<td style="width:2%;"></td>
<td style="width:7%;"><input type="submit" name="send" value="Send" id="sendButton" /></td>
</tr>
</table>
</div>
My CSS
will be ,
#messageArea {
padding-left: 16px;
height: 10%;
width: 95%;
background-color: white;
}
#message {
width: 99.5%;
height: 49px;
border: none;
overflow: auto;
resize: none;
}
#sendButton {
width: 100%;
height: 60px;
background-color: #5690dd;
color: white;
}
Good answers will be appreciated.
Upvotes: 2
Views: 5859
Reputation: 1238
All the versions of IE have a scroll bar on text areas even when they are empty.If you want to remove try this
CSS
textarea { overflow: auto; }
The scrollbar will return (rightfully) when the text in the textarea expands beyond it's bounds.
EDIT : You can try this for opera
textarea {
resize: none;
}
Upvotes: 0
Reputation: 2218
Remove border styles from your td
element and instead apply it on your textarea
and you should be good to go.
<td id="msgvalue" style="width:91%;">
<textarea id="message" onkeypress="javascript:message_onkeypress(event);" style="border: 1px solid #6495ED"></textarea>
</td>
Upvotes: 0
Reputation: 1060
You should be able to remove it using:
textarea:focus, input:focus{
outline: none;
}
Upvotes: 3