Re: positioning div relative to window
- From: totalstranger <totalstranger@xxxxxxxxxxxxx>
- Date: Mon, 28 Aug 2006 21:10:16 -0400
On or about 8/28/2006 7:08 PM, it came to pass that Randy Webb wrote:
totalstranger said the following on 8/28/2006 5:57 PM:You can use IE's proprietary conditional comments to select the proper CSS and make settings based upon the version of IE that's executing. The comments are not processed by other browsers. I implemented this when I wanted to get rid of my javascript sniff routine. This lets my site work for most modern browsers.On or about 8/28/2006 3:58 PM, it came to pass that David Dorward wrote:libsfan01 wrote:Fixed elements are supported by IE7 in strict mode, it acts like IE6 in quirks mode. I use the Fixed element simulator with one of my pages, and while it does work I feel it's kind of ugly.
is it possible to position a div relative to the document window? so
for example if the page is scrolled down the div in question does not
move
position: fixed.
Not supported by MSIE.
JavaScript hacks to simulate it in that browser are available. Google can
help you find them.
Then use position:fixed in IE7 and let IE6 users migrate.
Or, something like this:
<div style="top:0px;left:0px">Top Div</div>
<div style="top:20px;left:0px;overflow:scroll">Put your page contents here</div>
And let them scroll the div element instead of the body.
A sample of what I use on my site follows. If it's IE6/5 the IE5.css will cascade and override the Default.css.
<LINK REL="style***" TYPE="text/css" HREF="CSS/Default.css"
<!--[if lte IE 6]>
<LINK REL="style***" TYPE="text/css" HREF="CSS/IE5.css">
<![endif]-->
.
- References:
- positioning div relative to window
- From: libsfan01
- Re: positioning div relative to window
- From: David Dorward
- Re: positioning div relative to window
- From: totalstranger
- Re: positioning div relative to window
- From: Randy Webb
- positioning div relative to window
- Prev by Date: Re: Cross domain autofill and submit
- Next by Date: Javascript onmouseover/out vs. Opera browser
- Previous by thread: Re: positioning div relative to window
- Next by thread: focus problems on reload
- Index(es):
Loading