changing the position of the log-in box?

Discussion in 'PHP' started by chrisj, Aug 10, 2007.

  1. #1
    I have a log-in box on this page. How can I change the login from a box on the right-hand side of my page, to a login that will be in a horizontal line that runs horizontally below the header image? and with keeping it's functionality intact. Thanks, here the page code:

    <link href="../style.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
    </style><table width="770" cellpadding="0" cellspacing="1" bgcolor="#FFFFFF"
    style="border-right: solid 1px #6b6b6b";>
    	<tr>
    		<td width="174" align="left"valign="top" bgcolor="#A30100">
    		<a href="index.php"><font color="white"><strong>&nbsp;&nbsp;Home</strong></font></a><br />
    		<A href='index.php?command=signup_page'><font color="white"><strong>&nbsp;&nbsp;Signup</strong></font></A>
    		<br />
    		[member_menu]&nbsp;</td>
    		<td width="420" valign="top">&nbsp;&nbsp;&nbsp;[main_content]&nbsp; </td>
    		
    		<td width="174" valign="top" bgcolor="#FFFFFF" align="right">
    			<TABLE width="174" style='border:1px solid gray' cellpadding="0" cellspacing="0" >
    			<form method="POST" action="index.php">
    		<input class='field' type='hidden' name='command' value='account'>
    		<input class='field' type='hidden' name='param' value='login'>
    				<tr><td colspan='2' style='background-color:gray;color:white;font-size:14;font-weight:bold'>&nbsp;Login</td></td>
    				<TR height='5px'><td height='5px'>&nbsp;</td></TR>
    				<tr>
    					<td style='font-size:14px' class='fieldLabel'>Username</td>
    					<td><input style='height:17px' class='field' type='text' size='12' maxlength="30" name='user_name' value='[user_name]'>&nbsp;	
    					</td>	
    				</tr>
    				<tr>
    					<td style='font-size:14px'  class='fieldLabel'>&nbsp;Password&nbsp;</td>
    					<td><input style='height:17px' class='field' type='password' size='12' maxlength="30" name='password' >&nbsp;
    					</td>
    				</tr>
    				<TR height='5px' > 
    					<td colspan='2' class='errorMessage' align="center">&nbsp;
    						<SPAN style='font-size:11px'>[login_message]</SPAN></td>
    				</TR>
    				<tr><td colspan="2" align="center"  class='hLine'><A href='index.php?command=send_pass'>
    					<SPAN style='font-size:11px;'>forgot password?</SPAN></A><br />
    					<center><input class='button' type='submit' value='Login'></center>
    					
    	
    					</td>
    				</tr>
    				
    			  </form>
    			</TABLE>
    		
    	</tr>
    </table>
    Code (markup):
     
    chrisj, Aug 10, 2007 IP
  2. killerj

    killerj Active Member

    Messages:
    765
    Likes Received:
    34
    Best Answers:
    0
    Trophy Points:
    95
    #2
    All you need to do is get rid of the table elements . The <table> , <td> and <tr>
    then use
    
    <div class=someclass>
     <form action="index.php" method="POST"> 
    	   
           Username:<input style='height:17px' class='field' type='text' size='12' maxlength="30" name='user_name' name="some name"> 
    	   
           Password:<input type="password" name="password"> 
    	   
           <input type="submit" name="submit" value="submit this"> 
           </form> 
    </div>
    
    PHP:
    After that , you may stylize the div tags with css .
    good luck .

    P.S : i wrote this just as an example . Its not exactly the copy/paste thing for you , but the idea as a whole .
    Please experiment and try it . It'll help you learn along as well :)
     
    killerj, Aug 10, 2007 IP