...

View Full Version : Html input form messing up vertical alignment



nicks0r
05-26-2005, 02:56 AM
The use of this form is making forcing my vertical alignment to the top:

http://s87590808.onlinehome.us/htmlprob.jpg

You can see in the second column the search form is on the top, I can't make it go to the middle no-matter what I do, here is the info

The table:

<table class="topbar" border=1>
<tr><td align="left">
<a href="<?php bloginfo('url'); ?>">Home</a> | <a href="general/">General</a> | <a href="Military/">Military</a> | <a href="articles/">Articles</a>
</td>
<td align="right">

<form id="searchform" method="get" action="<?php echo $PHP_SELF; ?>"><a>Search</a><input type="text" class="input" name="s" id="search" size="15" onFocus='form.s.value=""'/></form>

</td>
</tr></table>

Here is my css for class 'topbar'

.topbar {
padding-top: 3px;
padding-left: 5px;
padding-bottom: 3px;
padding-right: 5px;
width: 835px;
height: 17px;
background: #ffffff;
vertical-align: middle;
border-left: 1px solid #ddd;
border-right: 1px solid #ddd;
border-bottom: 1px solid #ddd;
margin-left: 10px;
margin-right: 10px;
}



I've been troubleshooting this for about an hour now and am totally clueless, I've narrowed it down to the form tag itself because when I take it out it aligns fine and looks how it is suppost to. I don't know why the form is forcing it to align to the top.

Any help would be grrrrrrrrrrrrrrrrrreatly aprecciated,

Thanks

_Aerospace_Eng_
05-26-2005, 02:59 AM
Man hours? Wow! You might feel a bit silly now. Its the default form margin.
in your css add this

form {
margin:0;
padding:0;
}

nicks0r
05-26-2005, 03:01 AM
sure do, but at least it works now

thanks a bunch



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum