djcubez Posted October 14, 2006 Share Posted October 14, 2006 Here's a screenshot: [img]http://djcubez.com/pictures/error/wtf.jpg[/img]Here's the code: [code]<table cellspacing="0" cellpadding="0" border="0"> <tr> <td height="30" width="650"><a href="#"><img src="images/bar_mid_link.jpg" /></a></td> <form><td valign="top" height="30" width="300"><img src="images/bar_mid_username.jpg" /><input class="bar_mid_field" type="text" name="username" /><img src="images/bar_mid_password.jpg" /><input class="bar_mid_field" type="password" name="password" /></td></form> </tr> </table>[/code]And here's a snippet from the style.css:[code].bar_mid {background-image: url("images/bar_mid.jpg");background-repeat: repeat-x;}.bar_mid_field {height: 15px;width: 75px;}[/code] Quote Link to comment https://forums.phpfreaks.com/topic/23962-form-input-fields-off-center-vertically/ Share on other sites More sharing options...
AndyB Posted October 14, 2006 Share Posted October 14, 2006 There's something wrong with your code. Might be a browser issue, might be a CSS issue, might be .... who knows what. At least post a working URL where we can see the problem in action, or post enough code to investigate. Quote Link to comment https://forums.phpfreaks.com/topic/23962-form-input-fields-off-center-vertically/#findComment-108899 Share on other sites More sharing options...
djcubez Posted October 15, 2006 Author Share Posted October 15, 2006 Yea I'm sorry about that, check my post in a few minutes it will be edited with new information.I tried using a "margin-bottom:" but different browsers read it differently so when it was on in another browser it was off in the other. Quote Link to comment https://forums.phpfreaks.com/topic/23962-form-input-fields-off-center-vertically/#findComment-108923 Share on other sites More sharing options...
AndyB Posted October 15, 2006 Share Posted October 15, 2006 I don't think having a form start and end tag as orphans stuffed in the middle of a set of table elements is helping. Far better to have the form start and end outside the table, or start and end within the same td element. Do you have any CSS that controls the margins/padding around a form? And what it is meant to look like? Quote Link to comment https://forums.phpfreaks.com/topic/23962-form-input-fields-off-center-vertically/#findComment-108931 Share on other sites More sharing options...
djcubez Posted October 15, 2006 Author Share Posted October 15, 2006 No, no margins or padding. Also, even if I move the form tags around it stays the same no matter if they're or not.http://www.djcubez.com/secret/ogrc/ Here's the link. Quote Link to comment https://forums.phpfreaks.com/topic/23962-form-input-fields-off-center-vertically/#findComment-108935 Share on other sites More sharing options...
fenway Posted October 15, 2006 Share Posted October 15, 2006 It's a line-height issue... images have a different base than block elements. Quote Link to comment https://forums.phpfreaks.com/topic/23962-form-input-fields-off-center-vertically/#findComment-109067 Share on other sites More sharing options...
djcubez Posted October 15, 2006 Author Share Posted October 15, 2006 I understand but I don't. What should I change the height of? Quote Link to comment https://forums.phpfreaks.com/topic/23962-form-input-fields-off-center-vertically/#findComment-109094 Share on other sites More sharing options...
fenway Posted October 15, 2006 Share Posted October 15, 2006 Images have different baselines than text... you'll have to determine which combination of vertical alignment solves the problem. Quote Link to comment https://forums.phpfreaks.com/topic/23962-form-input-fields-off-center-vertically/#findComment-109104 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.