Re: Re: Javascript + CSS + IE
Martin Reurings <[email protected]> Wed, 15 Nov 2006 09:42:09 +0100
| 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'.
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...
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