Jump to content

Cant Center This In Ie6,8 But In Ff Works Great Also Text Dissapears Only On This Page..


Dareus

Recommended Posts

Hi Ok, so the below code I am trying to center the accept the terms of agreement, and either A) center the email and password forms OR :) make them on top of eachother... I have a seperate stylesheet for IE6 so I'm trying to figure out how to center the PHP in IE6.. is there some CSS rule I can use/make? and put in the IE6?

<?phpif($_SESSION['verified']!="yes"){if(isset($_POST['email']) && !empty($_POST['email']) && $_POST['tos']=="yes"){$email=$_POST['email'];// You can edit parts in quotes$sub="Thank you for checking out the site";$pass="318DPL";$message="You can view the password protect parts with this password: $passhttp://".htmlentities($_SERVER['HTTP_HOST'])."/agreement.php\"";$succ="<tr><td class=\"green\" colspan=\"2\">Email sent. You may need to check your Spam/ Junk Email folder</td></tr>";$url="yoururl";// Stop do not editmail( "$email", "$sub",  $message, "From:info@318desprairies.com");echo"<a name=\"pass\"><table id=\"form\"><form action=\"agreement.php#pass\" method=\"post\" />$succ<td><input type=\"password\" name=\"pass\"  value=\"Password\"/> </td><td><input type=\"submit\" value=\"Submit Password\" /></td></tr></table></form>";}else{if(isset($_POST['email']) and  empty($_POST['email'])) {$err="<tr><td id=\"error\" colspan=\"2\">You  did not give a valid  email </td></tr>";}if(isset($_POST['ch'])  and  $_POST['tos']!="yes") {$errr="<tr><td id=\"error\" colspan=\"2\">You  did not agree to the  Confidentiality Agreement</td></tr>";}echo"<table id=\"form\">$passerr$err$errr<form action=\"agreement.php#pass\" method=\"post\" /><tr><td class=\"redbold\" colspan=\"2\"><center><input type=\"radio\" name=\"tos\" value=\"yes\" /> Agree to the Confidentiality Agreement</center></tr></td><tr><td><input type=\"text\" name=\"email\"  value=\"Email\"/> </td><td><input type=\"submit\" value=\"Request Password\" name=\"ch\" /></td><td></tr></form><a name=\"pass\"><form action=\"agreement.php#pass\" method=\"post\" /></td><td><input type=\"password\" name=\"pass\"  value=\"Password\"/> </td><td><input type=\"submit\" value=\"Submit Password\" /></td></tr></table></form>";}}?>

my css for this is

	<link href="../styles.css" rel="stylesheet" type="text/css" />	<style type="text/css">	.centerdiv {	width:900px;	max-width: 900px;	}	.redbold {	font-weight: bold;	color: #C33;	text-align: center;}	.centeragreement {	text-align: center;	border-top-color: #F00;	border-top-style: dotted;	border-top-width: 2px;	border-bottom-color: #F00;	border-bottom-style: dotted;	border-bottom-width: 2px;	margin-top: 0px;	margin-bottom: 0px;	padding: 15px;}.centered {	text-align: center;}.footer {	height:262px;	float:left;	width:900;}table#form{text-align:center;margin:auto;}td{padding:10px;}.green{color:green;margin:auto;text-align:center;}	</style>

Also, On this same page... it's at www.318desprairies.com then click EnglishCan someone PLEASE tell me why my footer text is gone??????It shows up in IE6 in every other page but this one.. Is there a rule I have on it by accident? or a conflict??I've been trying this for 6 hours last night and now this morning, I am stumped and I dont want to over edit and mess this page up :) Please and thanks

Link to comment
Share on other sites

Your HTML is not structured very well. This is what I see when I view the source of the page:

<table id="form"><form action="agreement.php#pass" method="post" /><tr><td class="redbold" colspan="2"><center><input type="radio" name="tos" value="yes" /> Agree to the Confidentiality Agreement</center></tr></td><tr><td><input type="text" name="email"  value="Email"/> </td><td><input type="submit" value="Request Password" name="ch" /></td><td></tr></form><a name="pass"><form action="agreement.php#pass" method="post" /></td><td><input type="password" name="pass"  value="Password"/> </td><td><input type="submit" value="Submit Password" /></td></tr></table></form>

First, it's not correct to have a form tag inside of a table tag but not inside of a td. This is not correct:<table><form><tr>...either do this:<form><table><tr>or this:<table><tr><td><form>The only things that go inside a table are things like <thead>, <tbody>, <tr>, <td>, etc, not <form>. That named anchor is also in the wrong place, and doesn't have a closing tag. The anchor should also go either before the table or inside a td.Also, you need to close tags in the same order you open them. Without the tds, this is your table and form structure:<table><form></form><form></table></form>That last form contains the closing table tag. That doesn't make sense structurally, you have one container inside another (the form is inside the table), but then the table ends before the form does. That doesn't make sense. You did the same thing here:<tr><td class="redbold" colspan="2"><center><input type="radio" name="tos" value="yes" /> Agree to the Confidentiality Agreement</center></tr></td>You start the tr, then start a td, then close the tr, then close the td. The td is supposed to be inside the tr, it's supposed to close before the tr does. That's probably why the colspan isn't working, because you're confusing the browser.You also have this:<td><input type="submit" value="Request Password" name="ch" /></td><td></tr>You open and close the td for the button, then you open another td and just close the tr. Why is that extra td there? You do have a closing td, but it's way down:<td><input type="submit" value="Request Password" name="ch" /></td><td></tr></form><a name="pass"><form action="agreement.php#pass" method="post" /></td>You're opening one td, then closing the tr, then closing a form and starting another form, then closing the td.Basically what I'm saying is that none of that table and form structure makes sense, and it's confusing the browser. If you fix the table, you'll probably fix whatever other problems you're having.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...