amandawhite.ajw Posted January 12, 2011 Report Share Posted January 12, 2011 I am a beginner when it comes to websites and I am trying to set up a contact form on my website. Right now I don't have it set up with PHP (Next monster to tackle!) just with "mail to" and that is all working fine. The thing I am having trouble with is getting the comments label to line up with the top of my comments text area. Right now "comments" is positioned at the bottom of the text area. I am using spry for the form and buttons. If anyone can help me out I'd really appreciate it. I attached a picture of the site and included the source code below. THANKS!! SOURCE CODE: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Contact Consulting By Charles</title> <style type="text/css"> body,td,th { font-family: "Courier New", Courier, monospace; font-size: 16px; color: #5f6062; } body { background-color: #F5F7F6; text-align: center; } a:link { color: #5f6062; text-decoration: none; } a:visited { text-decoration: none; color: #5f6062; } a:hover { text-decoration: none; color: #333; } a:active { text-decoration: none; color: #5f6062; } #apDiv1 { position:relative; top:30px; width:90%; z-index:1; background-color: #FFF; text-align: left; margin-right: auto; margin-left: auto; bottom: 30px; padding-top: 20px; padding-right: 15px; padding-left: 15px; } .contact_text { color: #000; text-align: left; } .footer { font-size: 11px; text-align: center; width: 100%; margin-right: auto; margin-left: auto; position: absolute; bottom: 0px; } .form { text-align: center; } .contact_emailtext { color: #5f6062; } </style> <script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script> <script src="SpryAssets/SpryValidationTextarea.js" type="text/javascript"></script> <link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" /> <link href="SpryAssets/SpryValidationTextarea.css" rel="stylesheet" type="text/css" /> </head> <body> <p><a href="index.html"><img src="logo.jpg" alt="C By C" width="148" height="135" border="0" /></a> <br/> <br/> <a href="clients.html">Clients</a> ⋅ <a href="contact_2.html">Contact</a> ⋅ <a href="careers.html">Careers</a><br/> <div id="apDiv1"> <blockquote> <p><span class="contact_text">01. PHONE</span><br /> 212.514.6236 </p> <p><span class="contact_text">02. EMAIL</span><br /> <a href="mailto:Contact@ConsultingByCharles.com">Contact@ConsultingByCharles.com</a> </p> <p class="contact_text">03. FORM </p> </blockquote> <form action="MAILTO:contact@consultingbycharles.com" method="post" name="form3" id="form3"> <span id="sprytextfield3"> <label for="Name">Name</label> <input name="Name" type="text" id="Name" size="40" /> <span class="textfieldInvalidFormatMsg">Invalid format.</span></span> <p><span id="sprytextfield4"> <label for="email2">Email</label> <input name="email2" type="text" id="email2" size="40" /> <span class="textfieldInvalidFormatMsg">Invalid format.</span></span></p> <p><span id="sprytextfield1"> <label for="phone">Phone</label> <input name="phone" type="text" id="phone" size="40" /> <span class="textfieldInvalidFormatMsg">Invalid format.</span></span></p> <p><span id="sprytextarea1"> <label for="comments">Comments</label> <textarea name="comments" id="comments" cols="60" rows="8"></textarea> <span class="textareaMaxCharsMsg">Exceeded maximum number of characters.</span></span></p> <p> <input name="Reset" type="reset" class="contact_emailtext" id="Reset" value="Reset" /> <input name="Submit" type="submit" class="contact_emailtext" id="Submit" value="Submit" /> </p> <p> </p> </form> </div> <p> </p> <p> </p> <script type="text/javascript"> var sprytextfield3 = new Spry.Widget.ValidationTextField("sprytextfield3", "custom", {validateOn:["blur"], isRequired:false}); var sprytextfield4 = new Spry.Widget.ValidationTextField("sprytextfield4", "email", {validateOn:["blur"], isRequired:false}); var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1", "phone_number", {validateOn:["blur"], format:"phone_custom", isRequired:false}); var sprytextarea1 = new Spry.Widget.ValidationTextarea("sprytextarea1", {validateOn:["blur"], maxChars:600, isRequired:false}); </script> </body> </html> Quote Link to comment Share on other sites More sharing options...
quyen Posted January 13, 2011 Report Share Posted January 13, 2011 (edited) Hi, I've just had a look at your code, and my suggestion is: Put this code into your Css: label{ vertical-align: top; } In case you have some questions, visit http://www.w3schools.com/css/pr_pos_vertical-align.asp website. Goodluck! Quyen, Edited January 13, 2011 by quyen Quote Link to comment Share on other sites More sharing options...
amandawhite.ajw Posted January 13, 2011 Author Report Share Posted January 13, 2011 Thanks Quyen...I will try that out. Appreciate the help! Best. Quote Link to comment Share on other sites More sharing options...
amandawhite.ajw Posted January 13, 2011 Author Report Share Posted January 13, 2011 I tried adding label{ vertical-align: top; } to the css and nothing changed. I have been trying to search for an answer online but nothing I find will move the label to the top. Any other suggestions are greatly appreciated! Best. Quote Link to comment Share on other sites More sharing options...
newseed Posted January 13, 2011 Report Share Posted January 13, 2011 Try adding float: left to the label. If that fails, can you provide a url of the site you are working on? Quote Link to comment Share on other sites More sharing options...
quyen Posted January 14, 2011 Report Share Posted January 14, 2011 Hi, It works fine here. Could you send me the link to your website? or some how I can view your code. Quyen, Quote Link to comment Share on other sites More sharing options...
EvaBrown Posted January 14, 2011 Report Share Posted January 14, 2011 I also want to see your site! Can you post you web site link? Quote Link to comment Share on other sites More sharing options...
danhodge Posted January 14, 2011 Report Share Posted January 14, 2011 Eddies suggestion should work, float: left always works for some reason :L Quote Link to comment Share on other sites More sharing options...
quyen Posted January 15, 2011 Report Share Posted January 15, 2011 Did you mean something like this: http://qwebdesign.net/demos/test.html or something else? Quote Link to comment 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.
Note: Your post will require moderator approval before it will be visible.