PDA

View Full Version : Netscape Center tags???


Crash1hd
05-11-2003, 09:04 AM
ok I have the following code and for what ever reason netscape does not do what I have marked in red

<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="28%">&nbsp;</td>
<td width="42%">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="50%"><p align=right>Username:&nbsp;&nbsp;</p></td>
<td width="50%"><input type="text" name="username" value="<% = Server.HTMLEncode(username) %>" size="20" /><% If submitnumber > 1 AND username = "" Then Response.Write("<span style=""color:#cc0000""> * Required</span>") %></td>
</tr>
<tr>
<td width="50%"><p align=right>Password:&nbsp;&nbsp;</p></td>
<td width="50%"><input type="password" name="pass" value="<% = Server.HTMLEncode(pass) %>" size="20" /><% If submitnumber > 1 AND pass = "" Then Response.Write("<span style=""color:#cc0000""> * Required</span>") %></td>
</tr>
<tr>
<td width="100%" colspan="2"><P Align=center><input type="checkbox" name="rememberme" value="1" /> Remember my username and password</p></td>
</tr>
</table>
</td>
<td width="34%">&nbsp;</td>
</tr>
<tr>
<td width="28%">&nbsp;</td>
<td width="42%"><P Align=Center><input type="hidden" name="submitnumber" value="<% = submitnumber %>" /><br /><input type="submit" value="Submit" /><br /><br /><a href="login/register.asp">New Members Register Here</a></p></td>
<td width="34%">&nbsp;</td>
</tr>
</table>

For what ever reason if you run that in netscape it doesnt center the info that I want centerd for me to make it work I have to use the old <center></center> tags which I dont want to have to do??? I have also tried useing a class=center in a css file that looks like this

.center {text-align:center}

but that also doesnt work the odd part is the p align=right in the blue works fine but if I was to replace the p align=center to p align=right it still doesnt work there is something I am missing here but I dont know what>??

Nightfire
05-11-2003, 09:59 AM
Try it as <p align="center"> instead of <P Align=center> if that fails, just stick align="center" into your td tag

Crash1hd
05-11-2003, 10:23 AM
Ok I know that the <P Align="center"> doesnt work tried that havent tried without the P part will give that a try! but how would you close that! I think the bigger question is why doesnt it work?

Nightfire
05-11-2003, 11:06 AM
I meant with align in lowercase, just like they are everywhere else where it's working right. The align="center" on it's own, I think you misunderstood me :) I mean in your td tag itself...

<td width="100%" align="center"> :)

brothercake
05-11-2003, 01:38 PM
Align on <p> doesn't work in netscape 4, and <center> is deprecated, so I'd second Nightfire's suggestion of the align attribute in the TD.

I'd be negligent if I didn't ask though ... why using tables for layout? why still concerned about netscape 4?

giz
05-11-2003, 01:55 PM
Netscape ignores some unquoted attribute values, so make sure the attriute value is in "quotes".

Make sure the code is in lower case. This is a requirement if you are writing XHTML pages (rather than HTML - you didn't say).

Crash1hd
05-11-2003, 08:58 PM
ok actualy I am useing asp pages and I am sure there is a much better way of doing it! the reason for worrying about netscape 4 is I just wanted the site to be compatable with all browsers!

Ok the align="center " in the td tag works but I still dont understand why the p align=right works but the p align=center doesn't

pardicity3
05-11-2003, 09:18 PM
Originally posted by Crash1hd
I just wanted the site to be compatable with all browsers!
Using a layout that uses tables ISN'T compatible with all browsers. I have finally accepted the key to compatability isn't in how well a page looks on legacy browsers it's how well it degrades. Using a non-table based layout makes for a page that degrades wonderfully on older browsers. Also, if someone is still using a "legacy" browser, do you think they really care how a page looks?

Vladdy
05-11-2003, 09:19 PM
Originally posted by Crash1hd
the reason for worrying about netscape 4 is I just wanted the site to be compatable with all browsers!
First, "being compatible" and "rendering the same" are absolutely different things.
Second, tables make your site incompatible with quite a few browsers.