简体   繁体   English

CSS / HTML:浮动元素中间的输入字段

[英]CSS/HTML: Inputfield in the middle of the floated element

I have this right now: 我现在有这个:

http://jsfiddle.net/Rf8gy/ And this is how I want it: http://jsfiddle.net/Rf8gy/这就是我想要的:

替代文字

If you see in the fiddle, the input field is at top. 如果您在小提琴中看到,输入字段位于顶部。 I want it be like the middle of the floated element on the left. 我想它就像左边浮动元素的中间。 How can I do this? 我怎样才能做到这一点?

The easier way is to add a top margin to the input: 更简单的方法是在输入中添加上边距:

#statusUpdate {
    margin-top:10px;
}

Just add this line in your css: 只需在你的CSS中添加这一行:

#smartStatus_writer input{
    margin-top: 11px;
}

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM