PDA

View Full Version : relative positioning in Netscape


misterx
07-01-2003, 01:34 AM
I can't get Netscape to relatively position a table in any version I try(4.7 all the way up to 7). Here is the gist of the page:


<style type="text/css">
<!--
/* avoid stupid IE6 bug with frames and scrollbars */
body {
voice-family: "\"}\"";
voice-family: inherit;
width: expression(document.documentElement.clientWidth - 30);
}
table.login {
position: relative;
right: 65px;
bottom: 250px;
}
-->
</style>


And then lower down on the page there is a table where the attribute class="login" is in the table tag. In Internet Explorer it puts that table exactly where I expect it to but in Netscape it will not. Anyone know a way to make this work? Thanks.

realisis
07-01-2003, 04:46 AM
NS4.x does not recognize the right and bottom attributes... but I believe NS6 and 7 normally do though... Maybe more code is in order?

btw, I always find it hilarious when I see people on this board slagging one browser's bugs or quirks as "stupid" while conveniently ignoring bugs in other browsers ... Case in point: the reference to IE's allegedly "stupid" scrollbar bug (though you're presently having problems with Netscape positioning...).

I just quickly checked into http://bugzilla.mozilla.org/ and I notice almost 200,000 bugs listed. Leaving aside the question that many of the reported bugs are dupes... do you think the tens of thousands of remainders are all "intelligent" bugs?

misterx
07-01-2003, 08:24 AM
Originally posted by realisis
NS4.x does not recognize the right and bottom attributes... but I believe NS6 and 7 normally do though... Maybe more code is in order?

btw, I always find it hilarious when I see people on this board slagging one browser's bugs or quirks as "stupid" while conveniently ignoring bugs in other browsers ... Case in point: the reference to IE's allegedly "stupid" scrollbar bug (though you're presently having problems with Netscape positioning...).

I just quickly checked into http://bugzilla.mozilla.org/ and I notice almost 200,000 bugs listed. Leaving aside the question that many of the reported bugs are dupes... do you think the tens of thousands of remainders are all "intelligent" bugs?
Relax yo, I didn't write that comment. I simply added the login class to an existing stylesheet. Everything else you can thank the SquirrelMail (http://www.squirrelmail.org/) team for. Personally I tend to dislike Netscape because it simply doesn't seem to function as well for me(though Netscape 7 is getting close). But that's another topic entirely, and not why I'm here.

Regarding the first part of your message, I suspected as much...though I did try it with Netscape 7 to no avail. I think I'll probably just ditch the whole positioning thing in this case rather than try to figure out what the deal is.

meow
07-01-2003, 11:53 AM
If right-bottom doesn't work, have you tried top-left instead?

left: -65px;
top: -250px;

misterx
07-01-2003, 05:43 PM
That's interesting. I didn't realize you could use negative values.

bradyj
07-01-2003, 06:37 PM
Yeah, I use negative values all the time -- though, it's kinda a hack. I use negative values to center boxes on the page. Give it a huge margin and a huge negative value with padding and there you go.

realisis
07-02-2003, 01:47 AM
misterX: I just checked an absolutely positioned element in NS v6.1 and v7 ... and both versions implement bottom/right...

meow's suggestion brings up a good point however: there's no real advantage to using bottom/right for offsets unless you've declared position:absolute or position:fixed ... when declaring relative positioning on your element, might as well use the top/left attributes

SDP2006
07-02-2003, 02:30 AM
Here's a tip: Don't Use Netscape. IE is better!

Nightfire
07-02-2003, 03:34 AM
I agree, IE is better... for hiding thousands of errors... :rolleyes:

Mr J
07-02-2003, 03:38 PM
What are you trying to position the table relative to?

meow
07-02-2003, 03:43 PM
Itself. :)

misterx
07-02-2003, 05:52 PM
Originally posted by Mr J
What are you trying to position the table relative to? Originally posted by meow
Itself. :)

Yes:D It's relative to where it would be normally. You can still see what I'm talking about here (http://new.bigemail.com). The table that holds the little form for logging in is supposed to be near the middle. Yet in my tests Netscape 4.7 not only doesn't position it but doesn't show the form fields either! And Netscape 7 simply won't move it. Didn't try Netscape 6, that's the worst version in my opinion.

MotherNatrsSon
07-02-2003, 05:55 PM
I am using Netscape 7.02 on a Mac and the login fields appear and are centered under the image....:confused:

MNS

edit:

I also looked in Netscapoe 4.7 on a Mac and the form fields do not appear just the text. I bet it is because you have the / at the end of those tags. Try removing the backslash.

<tr><td align="right" width="30%">Password:</td><td align="left" width="*"><input type="password" name="secretkey" />
<input type="hidden" name="js_autodetect_results" value="SMPREF_JS_OFF" />
<input type="hidden" name="just_logged_in" value="1" />

meow
07-02-2003, 07:13 PM
misterx, I'm not sure I understand what you want to do and the login table is nested inside other tables and stuff. Just a quick one, but is something like this (http://ababa.net/cf/misterx.html) what you are looking for?

bradyj
07-02-2003, 07:39 PM
I see what you mean, but I do not see a way around it - I did want to point out that you are (like MotherNatrsSon said) using Backslashes to close the tags.

While this is proper thing to do for XHTML, I do not understand why you are using it for HTML Transitional (as your DocType states). If you DocType is wrong, could this not cause problems with how browsers render your site properly?

Mr J
07-02-2003, 07:49 PM
I think it is definately the way you have used the tables and are then trying to position outside the TD cell

A few alterations to the tables gets it working in IE5.5 and NS7

The file front_logo.jpg is needed as it was too big to post here

Mr J
07-02-2003, 07:50 PM
Oops ...forgot the zip

:o

Roy Sinclair
07-02-2003, 07:54 PM
The current crop of browsers don't choke on properly closed elements so that wouldn't be the source of the problem. Some older browsers would choke on those tags unless you placed a space before the / (ie: code <br /> instead of <br/>).