sseeley Posted February 13, 2010 Share Posted February 13, 2010 Hello I have a text field echo "<input type = \"text\" name = \"mobileTel\" id = \"mobileTel\" size = \"10\" maxlength = \"10\" value = \"$mobileTel\">"; I want to get the height of the input box smaller than the default. Can anyone help me with the code? Many thanks in advance. Stuart Link to comment https://forums.phpfreaks.com/topic/191986-html-input-text-size/ Share on other sites More sharing options...
vinpkl Posted February 14, 2010 Share Posted February 14, 2010 <input type="text" style="height:15px;" /> vineet Link to comment https://forums.phpfreaks.com/topic/191986-html-input-text-size/#findComment-1012012 Share on other sites More sharing options...
Axeia Posted February 15, 2010 Share Posted February 15, 2010 on a sidenote, you may want to use single quotes instead of escaping every double quote for easier to read code/less typing. For example: echo "<input type='text' name='mobileTel' id='mobileTel' size='10' maxlength='10' value='$mobileTel'>"; or reverse the quotes and use echo '<input type="text" name="mobileTel" id="mobileTel" size="10" maxlength="10" value="$mobileTel">'; If you want all inputs on the page to be displayed like that you may want to use this inside the <head> section. <style type="text/css"> input[type=text]{ height: 15px; } /*do note that attribute selectors do not work in IE6 */ </style> Link to comment https://forums.phpfreaks.com/topic/191986-html-input-text-size/#findComment-1012753 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.