PDA

View Full Version : Trouble Aligning Form Elements


supes
02.05.2004, 17:36
Hello all...

I'm building a Mambo template for my site, and I'm having a little bit of trouble getting form elements (like the search box and login module) vertically aligned the way i want them.

i'm trying to place the search under a horizontal menu, but even though i try to align it to the top, it still pushes itself down so it's just floating in space.

i'm also trying to place the login module under the same horiz. menu, i've modified mod_login.php to get it all horizontal, but i'm having the same problem when i try to valign it... login button is aligned but the username and password boxes push themselves down. (see image) (http://www.mambers.com/attachment.php?attachmentid=137)

this is the code for the search form in index.php:

<td valign="top">
<div align="left">
<form action='index.php' method='post'>
<img src="templates/r5/images/sub0.png" width="10" height="25" />
<input class="inputbox" type="text" style="font-size:10px" name="searchword" size="15" value="search..." onblur="if(this.value=='') this.value='search...';" onfocus="if(this.value=='search...') this.value='';" />
<input type="hidden" name="option" value="search" />
</form>
</div></td>

this is the code from mod_login.php:


<form action="<?php echo sefRelToAbs("index.php?option=login"); ?>" method="post" name="login">
<?php echo $pretext; ?>
<table width="325" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top"><?php echo _USERNAME; ?> <input type="text" style="font-size:9px" name="username" class="inputbox" size="10" />
<?php echo _PASSWORD; ?> <input type="password" style="font-size:9px" name="passwd" class="inputbox" size="10" />
<input type="checkbox" name="remember" class="inputbox" value="yes" />
<?php echo _REMEMBER_ME; ?> </td>
</tr>
</table></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input type="hidden" name="op22" value="login" /> <input type="hidden" name="lang2" value="<?php echo $mosConfig_lang; ?>" />
<input type="hidden" name="return2" value="<?php echo $return; ?>" />
<input type="submit" name="Submit2" class="button" value="<?php echo _BUTTON_LOGIN; ?>" /></td>
</tr>
</table> </td>
<td width="25">
<div align="center"><a href="<?php echo sefRelToAbs("index.php?option=com_registration&amp;task=lostPasswor d"); ?>"><img src="templates/r5/images/qmark.png" alt="Forgot Password?" width="9" height="9" border="0"></a></div></td>
</tr>
</table>
<?php echo $posttext; ?>
<?php
}
?>
</form>

apologies to the purists if my code is sloppy or whatever... i don't really know what i'm doing.

thanks in advance to anyone who can help me get this straightened out.

supes
03.05.2004, 01:29
Never mind. I got rid of it in the CSS... Big Ups to CSS!!!!