问题与输入&在表单中选择标签高度 [英] Issue with Input & Select tag height in form

查看:116
本文介绍了问题与输入&在表单中选择标签高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我在做一个表格,所以问题是当我给同样的高度&宽度到输入&选择标签,因此选择标签不像输入标签那样具有相同的高度.....

Hi i am making a form so the problem is when i am giving the same height & width to input & select tag so the select tag is not taking the same height like input tag.....

您可以建议我究竟是什么问题和唯一的一个像素差异选择标签的高度....

can you suggest me what exactly the problem and the only one pixel difference in height of select tag....

这里是演示,你会得到一个关于这个问题的想法: -
http://jsfiddle.net/RCnQa/12/

here is the demo where you will get a idea about the problem :- http://jsfiddle.net/RCnQa/12/

推荐答案

你必须给你的选择&

You have to give height to your select & give box-sizing property for this also.

select {
    border:1px solid #ccc;
    vertical-align:top;
    height:20px;
}
input, select{
  box-sizing: border-box;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
}

检查此http://jsfiddle.net/RCnQa/16/

适用于IE8&

Works on IE8 & above.

这篇关于问题与输入&在表单中选择标签高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆