div 文字 input 垂直居中
代码:
<!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>无标题文档</title> <style type="text/css"> .div1{ width:500px; height:60px; line-height:60px; border:1px solid #000; padding:0px 5px; } .font1{ color:#000; font-size:12px; font-family:Verdana, Arial, Helvetica, sans-serif; } .input1{ border:1px solid #999999; width:100px; height:38px; line-height:38px; } </style> </head> <body> <div class="div1 font1">This is a test.... <input type="text" name="textfield" id="textfield" class="input1" style="vertical-align:middle"/> <img src="q/q_False.gif" alt="" width="16" height="16" align="absmiddle"/> <a href="#">This is a link...</a> </div> </body> </html>