Click to See Complete Forum and Search --> : (HTML & CSS) Problems w/Netscape and position
msimmons
Jun 5th, 2002, 09:03 AM
My boss just broke the news to me that I cannot tell users "use IE or else." Since AOL has made the switch to Netscape I have to start making my code compliant. But anyway... the question is:
Does Netscape (I have 6.2... not sure what AOL is using but thats the vers I need it to work for I guess) support absolute positioning via css ? I had my page looking how I want in IE then tried to view it in Netscape and is all down the side of the page.
Thanks in advance,
Michael
JoshT
Jun 5th, 2002, 09:36 AM
Yes, the Gecko/Mozilla engine NS uses actually supports CSS better than the Windows version of IE6, as far as I can tell. Are you using the http://jigsaw.w3.org/css-validator/ validator? One common mistake I've frequently seen is that you must explicit set the units of positioning per the CSS specs ( so left: 35px is correct, left: 53 is not). IE "forgives" this, and other small errors, which actually make it fail full CSS compliance - the specs say to ignore it.
My boss just broke the news to me that I cannot tell users "use IE or else."
That's great news!
msimmons
Jun 5th, 2002, 09:55 AM
I haven't used the validator yet (and only found out about it a few mins ago while reading another post). I do declare my measurements though.
#ressummary {position:absolute; top:220px; left:317px;}
<div id="ressummary">
Some Stuff....
</div>
That's great news!
In a way I like doing things "right" but on the other hand I like to stick w/what I know... I never use netscape (did years ago when they were more advanced than IE was (vers 2?) so I have no idea what I can do and what I can't now.
Thanks
Michael
progressive
Jun 5th, 2002, 09:56 AM
Nothing to do with CSS but you'll need to know this for javascript !
If you've been developing solely for IE then you are probbably
used to accessing the DOM using document.all.elementName
NN6x uses document.getElementById('elementName') to access the DOM elements (getElementById is also supported by IE4 upwards) so if you use any JavaScript to move those layers around you need to use the correct access method.
msimmons
Jun 5th, 2002, 10:06 AM
Originally posted by progressive
NN6x uses document.getElementById('elementName') to access the DOM elements...
Thanks for the tip, makes me feel a bit better because I do it that way now (started about six months back after you (progressive) helped me w/a javascript problem.
Michael
msimmons
Jun 5th, 2002, 10:19 AM
I tried to use the validator and it stopped on the 2nd line (the first line is blank because of the ASP). Here is the error I received:
Warning: No Character Encoding detected! To assure correct validation, processing, and display, it is important that the character encoding is properly labeled. Further explanations.
Below are the results of attempting to parse this document with an SGML parser.
Line 2, column 61:
<!doctype html public "-//w3c//dtd html 4.01 transitional//en">
^Error: invalid formal public identifier "-//w3c//dtd html 4.01 transitional//en"
Line 2, column 62:
<!doctype html public "-//w3c//dtd html 4.01 transitional//en">
^Error: cannot generate system identifier for public text "-//w3c//dtd html 4.01 transitional//en"
Line 2, column 62:
<!doctype html public "-//w3c//dtd html 4.01 transitional//en">
^Error: reference to entity "HTML" for which no system identifier could be generated
Line 2, column 0:
<!doctype html public "-//w3c//dtd html 4.01 transitional//en">
^Error: entity was defined here
Fatal Error: unrecognized {{DOCTYPE}}; unable to check document
Michael
CiberTHuG
Jun 5th, 2002, 10:55 AM
As you get into it, you will find it very easy to figure out. I still feel like I started playing with the standards recently, but I really feel very confident with them. The documentation at W3C isn't the world's friendliest, but you get used to it.
I think this is great news, but I just recently redid my resume. I made it completely compliant. Damned if it doesn't look good. Only in Mozilla. It sucks in IE and Opera. I didn't even bother with Netscape.
I'm sure I could've made it look good in IE or Opera, but I have to use depricated elements or attributes. They are still part of the standard, but they are being passed over in favor of some CSS functionality that isn't supported in these browsers.
Anyway, point is, for wide cross browser support, keep things simple.
Oh, and remember to use em and ex where possible.
I think AOLs new embedded Netscape IDs itself as 7. I'm not sure if it is really Netscape 7, or just 6.x.
progressive
Jun 5th, 2002, 11:06 AM
Michael,
I take it your still doing the hotel site.
I just had a look at it and at your CSS and your using 'in'
#block_R1_C1 {position: absolute; top: 0.20in; left: 2.50in; width: 4.45in;}
I've never seen this used before only 'px' not sure if it is even valid but I'm sure CyberTHug will be able to tell us.
Am i looking at the right stuff ?
msimmons
Jun 5th, 2002, 11:08 AM
Originally posted by CiberTHuG
As you get into it, you will find it very easy to figure out. I still feel like I started playing with the standards recently, but I really feel very confident with them. The documentation at W3C isn't the world's friendliest, but you get used to it.
I'm sure this is the case and as with starting any new thing there is that uncertain time period. As for the doumentation, once I found out I had to change my evil ways I found a post of yours (CiberTHuG) to bookmark the links in your sig. :)
Originally posted by CiberTHuG
I think this is great news, but I just recently redid my resume. I made it completely compliant. Damned if it doesn't look good. Only in Mozilla. It sucks in IE and Opera. I didn't even bother with Netscape.
I thought Mozilla was Netscape... Like I said before I only use(d) IE so not sure what is in the world around me.
Originally posted by CiberTHuG
Oh, and remember to use em and ex where possible.
Pardon my ignorance... what is that?
Michael
msimmons
Jun 5th, 2002, 11:25 AM
Originally posted by progressive
I take it your still doing the hotel site.
Still hotel related (I work for a company in that field) but different project.
Originally posted by progressive
I just had a look at it and at your CSS and your using 'in'
I've never seen this used before only 'px' not sure if it is even valid but I'm sure CyberTHug will be able to tell us.
It is for inches and since that is American I can't see how it would be a standard... That is there because I am lazy :) A programmer that I colaborate with from time to time used that in a project and rather than reposition everything my way I just left it... But in this project (and most all of my others) I use px.
Originally posted by progressive
Am i looking at the right stuff ?
actually no :) but thanks for reminding me that directory was there... my server is a little cluttered and I never know what to delete (what was mine or someone elses, or what is in use and what was just a temp directory).
Michael
msimmons
Jun 5th, 2002, 01:55 PM
I ran the http://jigsaw.w3.org/css-validator/ validator and the only errors I have left are alt tags but it still just lines everything up on the right hand side.
Michael
CiberTHuG
Jun 5th, 2002, 01:57 PM
em and ex are units for length (lick px).
If you set a font height and width the user can then "zoom" the page. Make the font larger or smaller. If you set a container for text and set it to the static width of 30px, then the text will overflow if they enlarge it too much.
You can set the width of the container to 24em. em is the width of one character (basicly, better description at W3C). So now when they enlarge the text, the container will grow, too.
ex is like em, but it is for height (right?).
msimmons
Jun 6th, 2002, 09:58 AM
Still a no go in NS6
Michael
msimmons
Jun 6th, 2002, 01:34 PM
I seem to have gotten all of my code compliant now and things are looking alot better... but, two of my tables are still not showing and not responding to my scroll function. I would post code but it is a large page and not sure where to begin.
Also why are some things positioned slightly off between the two browsers and is there a way to fix this?
Thanks in advance,
Michael
JoshT
Jun 6th, 2002, 02:03 PM
Also why are some things positioned slightly off between the two browsers and is there a way to fix this?
Make sure you set a DTD at the top of your HTML so the browser knows that you want it to render HTML correctly (this is especially important for IE6, because by default it renders CSS in the same incorrect way that IE5x does, unless you tell it otherwise).
I use:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
msimmons
Jun 6th, 2002, 02:14 PM
I added that line. It caused my table to show (incorrect formatting though) but things are still lined up differently and now my scrolling function dosen't work for the span's as well as the table in NS6
Thanks
Michael
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.