Ive got a contact form written in php, that I include on my website.
The contact form doesnt seem to want to align properly, the way I want it, and I cant figure out how to make it do so.
The script adds the stuff to my site with this little bit of code
PHP Code:
<?php $myContact = new maxContact(); $myContact->processForm(); ?>
the actual script itself is a little bit larger, but here is the section that draws the contact form elements.
PHP Code:
function showForm(){ $message = ''; echo '<form action="'.$_SERVER['PHP_SELF'].'" method="post">'; echo ' <table width="100%">'; echo ' <tr><td width="50%">Name:</td><td width="50%">Email:</td></tr>' .' <tr><td><input type="text" name="name" value="'.$this->name.'" size="35" /></td><td>'; echo ' <input type="text" name="email" value="'.$this->email.'" size="35"/></td></tr>'; // Now display additional elements //foreach ($this->fieldList as $value) { // echo ' <tr><td>'.$value['caption'].':</td></tr>' // .' <tr><td><input type="text" name="'.$value['fieldName'].'" value="'.$value['value'].'" /></td></tr>'; //} echo ' <tr><td colspan="2">Message:</td></tr>' .' <tr><td colspan="2" ><textarea cols="65" rows="6" name="message">'.$this->message.'</textarea></td></tr>' .'<tr><td align="center" colspan="2"><input type="submit" name="submitBtn" class="sbtn" value="Submit" /></td></tr>'; echo ' </table>'; echo '</form>'; }
What I want to do, is have the "Name" aligned left like it is, but have the "Email" field aligned right, so it lines up with the right side of the "message" box. the actual words "name" and "Email" are fine as they are, the inputs will just need to be made longer or something.
the other problem im having here is the width adjustment. as it is now, i cant get it to fit in the area that its supposed to, properly.
The site is www.teamspeakdisplay.com ( Username: user / Password: teamspeakdisplay) take a look at the contact area and you will see what I mean.
|