473,287 Members | 1,515 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,287 software developers and data experts.

Position: Fixed and IE6

I'm trying to get an image to float in a window despite scrolling.

I've gotten it to work on my Mac using IE 5.2, Netscape, and Safari, but it
goes wonky when I test it on a PC. (testing with IE only at the moment.)
Positioning is wrong, and it doesn't float at all.

Here's a test page: http://www.bdiusa.com/mirrors/test.html

I've tested the code using the CSS Validator on the W3 site - and it said
it's okay.

I did find an obscure reference (http://www.w3.org/Style/CSS/) commented in
the source code of one of the styles used, that mentions problems with
"fixed" positions in IE6, but no solution that I was able to interpret.

(by the way - the way the right hand menu bar is working on this page is
what I want to accomplish on mine...)

Is this an issue with IE6? My code seems solid - no errors, no problem with
other browsers that I've tested. So what am I doing wrong? Or if I'm not
doing anything wrong, is there a workaround to get this to work on a PC?

Thanks.
Jul 20 '05 #1
9 17684

Paul Trautwein wrote:
I did find an obscure reference (http://www.w3.org/Style/CSS/) commented
in the source code of one of the styles used, that mentions problems with
"fixed" positions in IE6, but no solution that I was able to interpret.


Problems? MSIE doesn't support it at all. It treats it as position: static.

JavaScript hack: http://www.mark.ac/help/sticky.html


Thank you. This is exactly the kind of thing I was looking for.

Jul 20 '05 #2

Paul Trautwein wrote:
I did find an obscure reference (http://www.w3.org/Style/CSS/) commented
in the source code of one of the styles used, that mentions problems with
"fixed" positions in IE6, but no solution that I was able to interpret.


Problems? MSIE doesn't support it at all. It treats it as position: static.

JavaScript hack: http://www.mark.ac/help/sticky.html


Thank you. This is exactly the kind of thing I was looking for.

Jul 20 '05 #3
David Dorward / 2003-09-10 20:11:
Paul Trautwein wrote:
I did find an obscure reference (http://www.w3.org/Style/CSS/) commented
in the source code of one of the styles used, that mentions problems with
"fixed" positions in IE6, but no solution that I was able to interpret.


Problems? MSIE doesn't support it at all. It treats it as position: static.


The problem isn't that MSIE wouldn't support 'fixed' value but that
the support is buggy and it interprets that as 'static' as you
mention. If it didn't have support, the correct behavior would be to
ignore the rule. Think following example:

..foobar {
position: absolute;
position: fixed;
}

Any correctly implemented browser that supports either 'absolute' or
'fixed' would result in more or less acceptable rendering. If the
browser didn't support 'fixed' the element would still be correctly
positioned ('absolute') but it simply wouldn't "float" above the
content while scrolling the page. However, MSIE happily "supports"
the 'fixed' value and that support is so buggy it seems that the
result is 'static'. The element will be positioned to entirely
different place.

Easy fix:

..foobar { position: absolute; }
html > body .foobar { position: fixed; }

MSIE won't follow the rules on the second line because its support
for CSS2 selectors is lacking.

--
Mikko

Jul 20 '05 #4
In article <BB****************@paultrautwein.com>, Paul Trautwein wrote:
I'm trying to get an image to float in a window despite scrolling.

I've gotten it to work on my Mac using IE 5.2, Netscape, and Safari, but it
goes wonky when I test it on a PC. (testing with IE only at the moment.)
Positioning is wrong, and it doesn't float at all.

Here's a test page: http://www.bdiusa.com/mirrors/test.html

I've tested the code using the CSS Validator on the W3 site - and it said
it's okay.

I did find an obscure reference (http://www.w3.org/Style/CSS/) commented in
the source code of one of the styles used, that mentions problems with
"fixed" positions in IE6, but no solution that I was able to interpret.


Hi. There is a workaround.

My CV at
http://www.turnip.clara.co.uk/jvaughan_cv_sysadmin.html
uses one, thanks to CSS borrowed from ricfink's post at

http://www.webmasterworld.com/forum83/560-3-15.htm

As you say Windows IE5/IE6 doesnt support position fixed properly, hence
the ugly workaround.

Hope this helps you

Jon
Jul 20 '05 #5
Lauri Raittila wrote:
In article <wC08b.414971$YN5.279720@sccrnsc01>, Brian wrote:
Mikko Rantalainen wrote:
.foobar { position: absolute; }
html > body .foobar { position: fixed; }

MSIE won't follow the rules on the second line because
its support for CSS2 selectors is lacking.


I think there must be no spaces in the child selector.
< http://w3development.de/css/hide_css...rowsers/child/ >

Thus, the op wants

html>body .foobar {position: fixed }


Afaik makes no difference, at least not on WinIEs I have tried.


Just tested this on MSIE 5.0/Win. It *does* make a difference. To
hide a child selector, this must be no spaces, e.g.
body>h1

and not
body > h1

--
Brian
follow the directions in my address to email me

Jul 20 '05 #6
In article <IZ48b.416626$YN5.280101@sccrnsc01>, Brian wrote:
Lauri Raittila wrote:
In article <wC08b.414971$YN5.279720@sccrnsc01>, Brian wrote:
Mikko Rantalainen wrote:

.foobar { position: absolute; }
html > body .foobar { position: fixed; }

MSIE won't follow the rules on the second line because
its support for CSS2 selectors is lacking.

I think there must be no spaces in the child selector.
< http://w3development.de/css/hide_css...rowsers/child/ >

Thus, the op wants

html>body .foobar {position: fixed }
Afaik makes no difference, at least not on WinIEs I have tried.


At least IE5.5 and IE6 IIRC
Just tested this on MSIE 5.0/Win. It *does* make a difference. To
hide a child selector, this must be no spaces, e.g.
body>h1

and not
body > h1


Does that mean that child selector _works_ with spaces in IE5.0? That
would be surprising.
--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Saapi lähettää meiliä, jos aihe ei liity ryhmään, tai on yksityinen
tjsp., mutta älä lähetä samaa viestiä meilitse ja ryhmään.

Jul 20 '05 #7
Brian wrote:
Lauri Raittila wrote:
Does that mean that child selector _works_ with spaces in IE5.0?
That would be surprising.

I just retested, using MSIE 5.0/Win2k. The following declaration

div > h1 {border: thin solid blue }

*does* produce a blue border.


OK. Could you test which ones of these it makes blue:

<div>
<h1>test1</h1>
</div>

<div>
<blockquote>
<h1>test2</h1>
</blockquote>
</div>

<h1>test3</h1>

Only test1 should be blue.

I'd be interested to know if MSIE5 simply ignores everything before h1
(that is up to ">") or if it simply ignores the ">". I don't think it
supports child selectors correctly.

--
Mikko

Jul 20 '05 #8
Brian wrote:
Mikko Rantalainen wrote:
<div>
<blockquote>
<h1>test2</h1>
</blockquote>
</div>


div> h1 test 1 and 2 have border; 3 does not (correct behavior)


Beg your pardon? Test 2 should *not* have a border: it is not a direct
child of a div. The rule you're thinking of goes along the lines of
'div h1'.
Jul 20 '05 #9
Owen Jacobson wrote:
Brian wrote:
<div>
<blockquote>
<h1>test2</h1>
</blockquote>
</div>


div> h1 test 1 and 2 have border; 3 does not (correct behavior)


Beg your pardon? Test 2 should *not* have a border: it is not a direct
child of a div. The rule you're thinking of goes along the lines of
'div h1'.


A thousand pardons I beg of you. Only test 1 should have had a border
in all the tests. In no test did MSIE 5.0/Win2k get it right.

--
Brian
follow the directions in my address to email me

Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Eric Wilds | last post by:
Greetings, I'm trying to use CSS to position a table in the top right corner of a webpage and not have the table disappear off the screen when the user scrolls down. Simply, my design is like...
5
by: Grayle | last post by:
I've heard that "position:fixed", which I use to scroll a navigation menu, does not work in IE. I have limited access to IE and would prefer to keep it that way. I am using <div class="nav">...
4
by: Peter Fjelsten | last post by:
Guys at comp.infosystems.www.authoring.stylesheets, I have designed a page in (x)HTML transitional that I am happy with in (close to) standard compliant browsers (i.e. Firebird/Opera), but IE...
5
by: Ted Mayett | last post by:
I've read a lot through the google archives, but I cannot seem to find an example... Has someone successfully made css code that allows for position: fixed to work in IE 6.0.2800? What is the...
7
by: Erik Sandblom | last post by:
Hello I'm trying to make some tooltips which are position:fixed. It works fine in Opera and Safari/Konqueror, but in Firefox and Camino (ie Mozilla), it takes a few seconds for each tooltip to...
2
by: Eric Lindsay | last post by:
Googling suggests that IE7 may support position: fixed; I think this might be handy for some pages I want to do. Does anyone have any comments about whether fixed should be considered for use on...
1
by: Roger | last post by:
While there are several web sites that make use of sidebars, there are relatively few that make use of fixed position sidebars. While fixed position sidebars offer the advantage of having the page...
5
by: pbd22 | last post by:
hi. i am messing around with CSS2.1 and position:fixed. I can't seem to get a "loading" span to move a little further left onto the page. It seems stuck on the upper right and kind of half way...
8
by: sheldonlg | last post by:
I have an app where position fixed works for FF and IE6 (with workaround). On IE7, the popup doesn't stay fixed in one place. The URL is http://www.sheldonlg.com/popup/popupLoc.html Click of...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
by: marcoviolo | last post by:
Dear all, I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.