demon_athens Posted April 7, 2006 Share Posted April 7, 2006 I am going mad... please somebody help. I just want a search form to be in a certain table with middle vertical-alignso Although this code works great in firefox, IE doesn't align the form in the middle like it should be ( vertical-align)[code]<td class="serachbox"><form name="form1" method="post" action=""><table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td width="90%" valign="middle"><div align="center"><input name="textfield" type="text" class="formbox" size="35" maxlength="20"> </div> </td><td valign="middle"><div align="left"><input name="imageField" type="image" src="template/common/arrow.gif" width="15" height="10" border="0"></div></td> </tr></table></form></td>[/code]and the css[code].serachbox { height: 41px; text-align: center; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #000000; vertical-align: middle; background-color: #999999;}.formbox { font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; color: #000000; background-color: #FFFFFF; border: 1px dashed #CCCCCC;}[/code]any ideas what goes wrong with this simple textfield alignment by height in Internet Explorer? I have IE 6.0+ Link to comment https://forums.phpfreaks.com/topic/6828-textfield-alignment-problem/ Share on other sites More sharing options...
moberemk Posted April 7, 2006 Share Posted April 7, 2006 Simple. IE doesn't support vertical-alignment, most likely. Why? Because IE is bad with CSS. Link to comment https://forums.phpfreaks.com/topic/6828-textfield-alignment-problem/#findComment-24835 Share on other sites More sharing options...
obsidian Posted April 7, 2006 Share Posted April 7, 2006 [!--quoteo(post=362608:date=Apr 7 2006, 02:36 PM:name=moberemk)--][div class=\'quotetop\']QUOTE(moberemk @ Apr 7 2006, 02:36 PM) [snapback]362608[/snapback][/div][div class=\'quotemain\'][!--quotec--]Simple. IE doesn't support vertical-alignment, most likely. Why? Because IE is bad with CSS.[/quote]ok, guys, let's at least read up on our facts before we start spouting things like this off... if you'll check a simple reference chart, vertical-align has been supported since IE 4: [a href=\"http://www.w3schools.com/css/css_reference.asp\" target=\"_blank\"]http://www.w3schools.com/css/css_reference.asp[/a]the problem is simply that IE interprets a large margin on the bottom of a form element that forces your content UP within the table cell. if you'll add a margin: 0; padding: 0; to your form tag, you should be fine. Link to comment https://forums.phpfreaks.com/topic/6828-textfield-alignment-problem/#findComment-24846 Share on other sites More sharing options...
moberemk Posted April 7, 2006 Share Posted April 7, 2006 Sorry if I said it in the wrong way. What I meant to say was that I thought that maybe IE didn't support it, given how often that seems to happen. Link to comment https://forums.phpfreaks.com/topic/6828-textfield-alignment-problem/#findComment-24875 Share on other sites More sharing options...
demon_athens Posted April 7, 2006 Author Share Posted April 7, 2006 THANK YOUUUUuu obsidian! Works great!! game over at lastttttt. Come to greece to buy you a greek coffee when ever you want! Link to comment https://forums.phpfreaks.com/topic/6828-textfield-alignment-problem/#findComment-24886 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.