Re: Re: Javascript + CSS + IE

"Adam Griffis" <[email protected]> Wed, 15 Nov 2006 09:07:05 -0500 (EST)
Newsgroups gmane.comp.web.dom.wdf
Message-ID <[email protected]>
> Accually, your page didn't have a doctype at all, adding html 4.01 with
> a dtd would have been sufficient. For more on this matter I recommend:
> http://www.ericmeyeroncss.com/bonus/render-mode.html
> A friendly warning. Browsers in standards mode are less forgiving. Make
> sure that any measurement you provide is always supplied a unit. For
> instance, when defining height, whether by script or css, '300' is
> meaningless you'd need to set it to '300px'.

Actually, my page DID have a doctype of HTML 4.0 - I just missed it in
transferring the application from VS.NET to simple HTML. I have since
added the doctype back in...and I intend over time to make the application
valid XHTML. I'll take a look at the link you sent me.
>
> As for the position: relative hack, it's not about position, it's about
> a magical property called 'hasLayout'. Something only found in the
> microsoft family of course. Just google on haslayout if you need to know
> more about it. I know from personal experience that 'position: relative'
> does not alway cause an element to get hasLayout, giving an element
> 'zoom: 1' does, but it's not an official css property and some
> validators might complain...

Thanks for the reference to hasLayout. It's interesting to me that on one
of the pages I found where it talks about the different values that cause
an element to havelayout, it mentions position: absolute but not position:
relative... I'll have to look more into that whole thing.

In reply to the comment from Kenneth:
Yes, I know I can set the height and width using CSS, and I have started
playing around with that. It's still causing some interesting issues, but
I'll test that a bit more myself before asking here. Another issue I've
noticed is that as soon as I set it to be XHTML (transitional or strict),
both vertical and horizontal scrollbars show up (only in IE), whether
they're needed or not. When they're not needed, they're disabled, but
they're still there, and I'm not sure why. I haven't yet looked into that
too much yet.

Thanks again for everyone's input. Due to some confusion on google groups
(where this is also posted), I have cleaned things up a bit. This copied
from my last past there:
------
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.
------
Thanks again for everyone's help!

>
> Adam Griffis wrote:
>> Thank you John and Ryan for your responses. I am playing around with
>> some
>> of the things you suggested, and I will let you know how it turns out.
>> Some comments right now:
>>
>> Ryan: I have played with the position: relative thing in the past,
>> knowing
>> that it causes many issues *not* having it (in IE). In the past it made
>> no
>> difference - maybe I just didn't go up enough levels with it. I will
>> continue to look into it.
>>
>> For now I have changed the doctype from HTML 4.01 to XHTML 1.0. It did
>> indeed solve the problem of the scrollbar jumping in and out - but it
>> caused a bunch of other ones in the process. I'm trying to rework the
>> page
>> so that 1) I can elimnate the table layout (XHTML doesn't like height /
>> width stuff on tables), and 2) I can fix the problems that appeared by
>> changing the doctype.
>>
>> John: The XHTML namespace in the HTML tag - I'm not completely sure
>> where
>> that came from. I wasn't really intending for it to force the page into
>> strict mode. Thanks for the input that it may be worse in strict mode -
>> I
>> will continue looking into this.
>>
>> Could you explain a bit more about selectstart? I have never used that
>> in
>> an event handler so I'm a bit confused about what it's supposed to do.
>> I'm
>> not even sure what the default selection behavior is that you're talking
>> about! Please forgive my ignorance.
>>
>> Thanks again guys - I'll let you know if I make any progress, and as
>> always, I would appreciate any more input anyone may have!
>>
>> Adam
>>
>
> --
> (   /'  _/_ __  _ _
> |/|///)(/(/(//_(-/
>         _/
> E-mail: [email protected]
> Website: http://www.windgazer.nl
>
> "The trouble with doing something right the first time, is nobody
>  appreciates how difficult it was."
>                                                -- Unknown Artist
>
>