rEhSi_123 Posted May 2, 2009 Share Posted May 2, 2009 Hello Guys, I have made a mini forum website and everything has being going well. But, I am now faced with one issue. In my login and register page all the text boxes are towards the right and the header on the top has also gone to the right...... ??? Whereas, everything seems fine in Mozilla Firefox, meaning the header is in the center along with the text boxes as I had it planned in my CSS file....... I have had this problem in the past where the contents of the pages dont sit correct in IE7. So was wondering if anybody here have had this problem in the past and if they could share the solution. Also I have used these in my CSS but no luck whatsoever. margin-left: auto margin-right: auto Please Help! Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 2, 2009 Share Posted May 2, 2009 text-align: center; Quote Link to comment Share on other sites More sharing options...
rEhSi_123 Posted May 2, 2009 Author Share Posted May 2, 2009 text-align: center; Cheers mate for your quick response...... But I had tried that earlier but didn't work either.... ..... It is funny that the screen contents are not aligned properly in IE7 but whereas everything is perfect in Firefox.... this is the CSS for my login .user_login { color:#000; font-weight:bold; font-family:Century Gothic; font-size:10pt; text-align:center; } Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 2, 2009 Share Posted May 2, 2009 I can't do anything with that CSS. Can you post some HTML as well? Quote Link to comment Share on other sites More sharing options...
rEhSi_123 Posted May 2, 2009 Author Share Posted May 2, 2009 I can't do anything with that CSS. Can you post some HTML as well? echo "<table border=\"0\" cellspacing=\"3\" cellpadding=\"3\">\n"; echo "<form method=\"post\" action=\"register.php\">\n"; echo "<p style=\"border:1px solid #C0C0C0;text-align:left;color:#660002;\"><a href=\"index.php\">MAIN |</a>Register - Please enter all the fields specified below!</p>\n"; echo "<tr><td class=\"user_login\">Username</td><td><input type=\"text\" name=\"username\" style=\"background-color:#00FFFF;\"></td></tr>\n"; echo "<tr><td class=\"user_login\">Password</td><td><input type=\"password\" name=\"password\" style=\"background-color:#C0D9D9;\"></td></tr>\n"; echo "<tr><td class=\"user_login\">Confirm Password</td><td><input type=\"password\" name=\"passconf\" style=\"background-color:#C0D9D9;\"></td></tr>\n"; echo "<tr><td class=\"user_login\">E-Mail</td><td><input type=\"text\" name=\"email\" style=\"background-color:#C0D9D9;\"></td></tr>\n"; echo "<tr><td class=\"user_login\">Name</td><td><input type=\"text\" name=\"name\" style=\"background-color:#C0D9D9;\"></td></tr>\n"; echo "<tr><td class=\"user_login\" colspan=\"2\" align=\"right\"><input type=\"submit\" name=\"submit\" value=\"Register\"></td></tr>\n"; echo "</form></table>\n"; Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 2, 2009 Share Posted May 2, 2009 Do you want the text centered or the entire table? Quote Link to comment Share on other sites More sharing options...
rEhSi_123 Posted May 2, 2009 Author Share Posted May 2, 2009 my actual code looks like this before I removed the   before no matter what peoperties I set in my CSS i wans't able to center out my contents even FF3.0 so Had to use this make shift...... I basically want the contents inside the table to be centered! Yes please! Thanks echo "<table border=\"0\" cellspacing=\"3\" cellpadding=\"3\">\n"; echo "<form method=\"post\" action=\"register.php\">\n"; echo "<p style=\"border:1px solid #C0C0C0;text-align:left;color:#660002;\"><a href=\"index.php\">MAIN |</a> Register - Please enter all the fields specified below!</p>\n"; echo "<tr><td class=\"user_login\"> Username</td><td><input type=\"text\" name=\"username\" style=\"background-color:#00FFFF;\"></td></tr>\n"; echo "<tr><td class=\"user_login\"> Password</td><td><input type=\"password\" name=\"password\" style=\"background-color:#C0D9D9;\"></td></tr>\n"; echo "<tr><td class=\"user_login\"> Confirm Password</td><td><input type=\"password\" name=\"passconf\" style=\"background-color:#C0D9D9;\"></td></tr>\n"; echo "<tr><td class=\"user_login\"> E-Mail</td><td><input type=\"text\" name=\"email\" style=\"background-color:#C0D9D9;\"></td></tr>\n"; echo "<tr><td class=\"user_login\"> Name</td><td><input type=\"text\" name=\"name\" style=\"background-color:#C0D9D9;\"></td></tr>\n"; echo "<tr><td class=\"user_login\" colspan=\"2\" align=\"right\"><input type=\"submit\" name=\"submit\" value=\"Register\"></td></tr>\n"; echo "</form></table>\n"; Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 2, 2009 Share Posted May 2, 2009 A table does have the attribute align center. Have you tried that? Quote Link to comment Share on other sites More sharing options...
rEhSi_123 Posted May 2, 2009 Author Share Posted May 2, 2009 A table does have the attribute align center. Have you tried that? You mean <td align=\"center\"> I have used the above but still luck..... The issue is if I dont use   then the text and textboxes are always on the left in FF3 and right in I.E7.0 ??? Even if set the properties in CSS or table Quote Link to comment Share on other sites More sharing options...
Ken2k7 Posted May 2, 2009 Share Posted May 2, 2009 <table align="center"> ? Do you have a page I can look at? Quote Link to comment Share on other sites More sharing options...
rEhSi_123 Posted May 2, 2009 Author Share Posted May 2, 2009 <table align="center"> ? Brilliant! :) :) :) :) :) :) I should have known this...... Problem resolved in both I.E 7 and Firefox! Thanks again 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.