[转]输入框对齐问题

Ghost 发表于 [2009-07-17 15:00]

最近做了一个表单的页面,被输入框的对齐问题烦死了,相信觉得烦的不只我一个,整理下相关的代码,包括输入框内、外文字的对齐。希望对大家有用:

<label><input type="radio" name="info_name" />名称</label>
<label>名称:<input type="text" class="input_text l_type" /></label>
input{
vertical-align
:middle;
}
input[type="radio"]
{
vertical-align
:-1px;
vertical-align
:middle\9;
}
.input_txt
{
height
:18px;
height
:22px\9;
padding-left
:1px;
padding-top
:4px;
padding-top
:0\9;
border
:1px solid #B3D0DF;
*line-height
:22px;
}

另外,跟大家分享下这次发现的终级hack,比之前《 最新CSS兼容方案 》的简单些:

css
.e{
color
:#FFF;/* FF,OP */
[;color
:#0F0;]/* Sa,CH */
color
:#FFF\9;/*IE6、7、8*/
*color
:#FF0;/* IE7、6 */
_color
:#F00;/* IE6 */
}
@media all and(min-width:0)
{
    .e{
        background-color
:#FF5500;/* OP */
    
}
}

 

文章地址:http://www.cssforest.org/blog/index.php?id=141

[原]输入框对齐问题》采用的授权是创作共用的 “署名-非商业性使用-相同方式共享 3.0 通用许可”.

 

posted @ 2009-12-17 10:21  css design  阅读(2150)  评论(0编辑  收藏  举报