views:

90

answers:

2

I'm trying to eliminate the extra bottom margin that both FF and Chrome seem to give to Textareas. Surprisingly IE seems to do it correctly. I would like to avoid using conditional includes but CSS3 tweaks are ok.

TIA!

Screen Shots

alt text

Sample Code

<!DOCTYPE html>
<html>
<head>
    <style>
        .red-box {
            background-color: red;
            overflow:hidden;
        }
        textarea {
            border:solid 1px #ddd;
            margin:0px; /* Has no effect */
        }
    </style>
</head>
<body>  
    <div class="red-box">
        <textarea>No Margin Please!</textarea>
    </div>
</body>
</html>
+2  A: 

By default, I believe both Chrome and Firefox will set these elements as display: inline-block;. Set display: block in your styles and you should be all set.

kmfk
A: 

Set display: block for your textarea.

Hameed