html - How to align input text field in div by vertically? -


there following html code:

<div id="top">     <div id="search"><h2 id="title">tasks</h2><input type="text" id="key-words-search"/></div>     <div id="controls">         <?php echo chtml::link('button 1', array('add'), array('id'=>'add-vacancy', 'class'=>'button-style')) ?>         <?php echo chtml::link('button 2', array('add'), array('id'=>'add-vacancy', 'class'=>'button-style')) ?>     </div> </div> 

i'd align input text field in "search" div vertically. how can it? in advance.

the best , compatible way use margin-top.
example:

<html>     <head>         <style type="text/css">             input {                 height:50px;                 margin-top:25px;             }             div {                 height:100px;                 border:1px solid #f00;             }         </style>     </head>     <body>         <div>             <input type="text" />         </div>     </body> </html> 

ps: vertical-align:middle not work in internet explorer.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -