473,386 Members | 1,706 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,386 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 17690

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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.