+ -
当前位置:首页 → 问答吧 → select改变高度后,如何垂直居中

select改变高度后,如何垂直居中

时间:2010-06-05

来源:互联网

如何修改select内的布局,只是想让文字上下居中就可以了(IE 8浏览器下,文字垂直不居中)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>form</title> <style type="text/css"> body { margin: 0px; font-size:14px; font-family:Tahoma, Geneva, sans-serif; } .wrapper{ background-image: url(images/form-bg.gif); background-repeat: no-repeat; width:840px; height:465px; } .form{ margin-left:42px; padding-top:48px; } input[type="text"]{ font-size:14px; width:224px; height:17px; border: 1px solid #959595; padding: 4px 10px; } select { font-size:14px; width:246px; height:37px; border: 1px solid #959595; } select option { padding:5px; margin:5px; } h1{ font-size:18px; letter-spacing:-2px; } table{ margin-top:25px; margin-left:5px; } </style> </head> <body> <div class="wrapper"> <div class="form"> <table height="245"> <tr> <td width="82">Type</td> <td><select name="request_type" class="s"> <option value="0"> -- Please select --</option> <option value="1">test</option> </select></td> </tr> </table> </div> </div> </body> </html>
 提示:您可以先修改部分代码再运行
[ 本帖最后由 alphat 于 2010-6-5 14:13 编辑 ]

作者: alphat   发布时间: 2010-06-05

热门下载

更多