CSS alignment textarea a
I've a textarea and a button-stylized link as :
__________________
| |
| |
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯ ______
|send|
------
I would like horizontal align.
My HTML :
<form method="post" action=""> 开发者_运维知识库
<div>
<textarea></textarea>
<a href="javascript:void(0);">Send</a>
</div>
</form>
My CSS :
textarea {
display: inline;
border: 1px solid #CCC;
-webkit-border-radius: 5px;
-moz-border-radius : 5px;
border-radius: 5px;
}
form a {
display: inline-block;
margin-top: -10px;
background: #CCC;
padding: 10px;
-webkit-border-radius: 5px;
-moz-border-radius : 5px;
border-radius: 5px;
}
Sorry for my english.
Why not use a float attribute? For example, in addition to your current CSS styles, append the following styles.
textarea {
float:left;
}
form a {
float:left;
}
精彩评论