John, thanks for taking an initial look. I will attempt to boil it down
further. See my reply to your comments inline.
John Hosking wrote:
Adam wrote:
Hello All,
Hello Adam
I have run into a JS / CSS layout issue in IE, and I can't for the life
of me figure out what's going on.
Well, I probably won't be able to help you either. With five .js files
and five (or at least two or three...) CSS files, I'll get dizzy right
away. Maybe if it were a simplified case, you'd either find the problem
yourself (as you threw things out one-by-one) or you'd make it easier
for the others here.
I have removed one of the js files as in this simplified version of the
application it could be combined into another file. As for the four
remaining ones:
1) prototype.js is a library that my application uses and you can
ignore it.
2) iedebugger.js is for help in debugging problems in IE (hence the
name). Not sure why you are getting an error with it in Firefox - maybe
you need to have the Firebug FF extension installed
(
http://joehewitt.com/software/firebug/). Either way, you can ignore
that problem in FF, and you can ignore the file as well. It is simply a
helper file and is insignificant to the problem.
3) resize.js is the ONLY file that need concern you, as it is with
resizing that the original problem comes and goes.
4) start.js simply sets some even handlers to, well, start my
application, and you can ignore it as well.
So basically, the only JS you would need to look at in regards to this
problem is the resize.js file.
I have eliminated all the extraneous CSS files, and removed unused
references from standand.css. Hopefully that will help clear things up
a bit.
>
In FF, however, I do get a js error on loading the page:
Error: invalid property id
Source File: http://www.griffisweb.com/resize/script/iedebugger.js
Line: 64, Column: 1
Source Code:
float:'right',
Does that help you?
No, not really. As stated above, iedebugger is solely for IE (it
duplicates a minimal amount of the functionality provided by Firebug in
FF) and has no relation to the problem. As for the error in FF, not
sure what could be causing that. In any event, this problem is an IE
problem, so if you're not getting the JS error in IE, I wouldn't worry
too much about it.
>
What I can say though, since I'm reading this in c.i.w.a.s, is that I'm
worried when I see "font-size:76%;" in a stylesheet. Visitors will
automatically have to bump up the text size a couple of notches just to
start out.
I have good reason to have that set to 76%, as it helps the page look
the same (or similar) across browsers. This should be used in
conjunction with EM sizing, which is the intent down the road here. For
a better explanation, I will refer you to
http://www.thenoodleincident.com/tut...fferences.html,
as that provides some examples as to what I'm talking about.
>
And in case you did not know, you can simplify some four-sided rules
like "padding: 0px 0px 0px 0px;" to "padding: 0px;" (or even "padding:0; ").
Yes, I know that. Thanks for letting me know, though. I tend to keep it
written out like that during development to make it easier to add /
test different padding / margin sizes quickly and easily.
>
I also thought you weren't allowed to have a <formimmediatel y within a
<body>. Maybe I'm wrong, though.
Not sure - that's how Visual Studio created the page. ;-)
>
Basically, I have one DIV that is
expanding beyond the bounds of the containing DIV, and I've literally
spent hours trying to find the problem.
Smells like quirks- vs. standards-mode to me, but that's without looking.
Could be. Problem is, if I enforce standards mode a bunch of other
things break. I'm trying various ways of doing this.
>
http://www.griffisweb.com/resize
ANY help would be greatly appreciated!
You seem to think your page is XHTML (based on your closing tags), but
you have no doctype defined. Try getting your page to validate first,
and maybe your other problems will clear up. If they don't, boil your
problem down to its simplest form, and if necessary, ask again.
Actually, I did have a doctype -- in my actual application. In moving
it over to a simplified HTML only page I missed transferring that. I
have now moved it to the sample page as well. The doctype is currently
HTML 4.0 -- but I'm in the process of moving it up to XHTML 1.0 (VS
2003 to VS 2005 upgrade and all).
>
--
Good luck,
John
Thanks, and I hope my clarifications help!