Submit Your Article Webforumz RegistrationAnnouncements Contact Webforumz StaffContact
Home Resources Blogs Meet the Team Contact Register
 

Go Back   WebForumz.com > The Code > HTML, XHTML and CSS

Reply
 
LinkBack Thread Tools
Old August 15th, 2006, 06:02 PM   #1
Highly Reputable Member
 

Join Date: Jul 2006
Location: Devon, England
Posts: 564
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 AdRock will become famous soon enough
Problem aligning submit button in Firefox

I am havign a problem aligning a submit button on one of my forms

I have pretty much the same code for my registration and login form which both work perfectly in IE and Firefox but this particlular form is causing problems.

The first 2 password fields are aligned properly but the submit button in Firefox is indented quite a lot. It's like the label for the submit button is directly underneath and inline with the 2nd password input box.

In IE it works properly but not in Firefox



HTML Code:
<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
<p class="style3"><label for="password1"">Password:</label>
<input type="password" title="Please enter a password" name="password1" size="30"></p>
 
<p class="style3"><label for="password2">Re-enter Password:</label> [/left]
<input type="password" title="Please re-enter password" name="password2" size="30"></p>
 
<p class="style3"><label for="submit">&nbsp</label>
<input type="submit" value="Change" class="submit-button"/></p>
</form>

Here is the CSS that is applied to the form

Code:
 
label { 
 
width: 70px;
float:left; display:block;
text-align: right; margin-right: 5px; }
.submit-button { width: 80px; background-color: #E4EFFF; border: 1px #C0C0C0 outset; font-family: Arial; f ont-size: 11px; }
.style3 { font-family: Arial, Verdana ; font-size: 11px; color: #000000; margin-top: 10px; margin-bottom: 10px; text-align: justify; }
I have included the file that is causing problems if anyone wants to test it in Firefox so you can see what I mean.
Attached Files
File Type: txt change-password.txt (2.2 KB, 29 views)

Last edited by AdRock; August 15th, 2006 at 06:04 PM..
AdRock is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 15th, 2006, 09:22 PM   #2
Elite Veteran
 
Ryan Fait's Avatar
 

Join Date: May 2006
Location: Las Vegas
Posts: 3,784
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough Ryan Fait is a jewel in the rough
Re: Problem aligning submit button in Firefox

I would rather see a link. And you don't need labels on submit buttons, especially not a label with a space in it. Try removing the label and take out the text-align: justify. It's useless and it might be the culprit.
Ryan Fait is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 16th, 2006, 06:04 AM   #3
Highly Reputable Member
 

Join Date: Jul 2006
Location: Devon, England
Posts: 564
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Altering Power: 0 AdRock will become famous soon enough
Re: Problem aligning submit button in Firefox

All fixed now...!

I need the labels in there to position the input boxes and submit button

I did however take out the text-align right and changed it to left and it now works. If i took it out altogether it would center.
AdRock is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Old August 16th, 2006, 06:13 AM   #4
Rob
Elite Veteran
SuperMember
 
Rob's Avatar
 

Join Date: Jul 2003
Location: Southern UK
Age: 35
Posts: 3,126
Blog Entries: 7
Thanks: 28
Thanked 22 Times in 19 Posts
Rep Altering Power: 0 Rob is a jewel in the rough Rob is a jewel in the rough Rob is a jewel in the rough
Re: Problem aligning submit button in Firefox

You definitly dont need a label for the submit button....

Just assign the submit button an id and then either use text-indent, or left margin to align it.
__________________
Rob - Webforumz Founder
Web Designer Support Network || Personal Project: Sanctuary for Student Midwives
Rob is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Bookmarks

Tags
problem , aligning , submit , button , firefox


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Submit button problems lucyhjones Your Design and Layout 4 September 6th, 2007 02:22 PM
Problem with Javascript Back Button in Firefox gorikain JavaScript 4 June 25th, 2007 06:23 PM
Aligning form in Firefox Craigj1303 HTML, XHTML and CSS 6 May 26th, 2007 08:17 AM
How can I use a graphic as submit button Sporky HTML, XHTML and CSS 2 April 17th, 2007 10:56 AM
Does a submit button have to be in the form itself Sylvester HTML, XHTML and CSS 1 April 17th, 2007 08:14 AM


Search Engine Optimization by vBSEO 3.2.0 RC8