我的一个输入框的问题是文本在右侧而不是左上角开始进一步,如下图所示。我已经看过类似的主题,但一直无法解决它。
<label for="content_field"><?php echo $this->__('Message') ?><span class="required">*</span></label>
<div class="input-box">
<textarea class="required-entry" name="content" id="content_field" cols="53" rows="100"
style="width: 1035px; height: 200px;"><?php echo $this->htmlEscape($data->getContent()) ?>
</textarea>
</div>
CSS
.form-list input[type="text"], .my-account select, textarea, #discount-coupon-form input {
width : 300px;
height : 22px;
border : 1px solid #bebcb7;
-webkit-border-radius : 3px;
-moz-border-radius : 3px;
border-radius : 5px;
margin : 0;
padding : 3px 3px;
color: #434343;
}
.form-list .input-box {
display : block;
clear : both;
width : 260px;
}
答案 0 :(得分:1)
我摆弄你的代码然后尝试了一切,然后意识到你在第一个textarea标签的末尾和结束的textarea标签之间确实有空格。删除我突出显示的橙色部分。
或者用以下代码替换您的代码:
<label for="content_field"><?php echo $this->__('Message') ?><span class="required">*</span></label>
<div class="input-box">
<textarea name="content" id="content_field" cols="53" rows="100" style="width: 500px; height: 200px;"><?php echo $this->htmlEscape($data->getContent()) ?></textarea>
</div>