473,503 Members | 13,285 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

position:fixed and IE

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">
<!--[if IE]><div class="crapnav"> <![endif]-->

in my HTML to point to different classes in my CSS, the only difference
between which is that one uses position:fixed and the other uses
position:absolute to keep the menu at the top of the page.

You can see the page at
http://www.hotkey.net.au/~ggboyle/pegasus/ptips.htm

It looks the way I want it to with Opera, Moz/Firebird and KMeleon.
The crapnav version looks ok in IE5.
Syntax-checked with "CSE HTML Validator Professional v4.05" but not
validated online (slow dial-up, every byte costs!)

Is there an easier/ better/ more correct way to do it?
AND, how can I get NN4 to display the menu at the top? I usually use
margin-top:5px;
margin-left:5px;

but that doesn't seem to work with position:fixed. Moving the HTML
around doesn't give the effect I want, either.

All help and advise welcome. I've learned a lot here already.
--
Win98se, P200 MMX, 64MB RAM Opera7.02Bork
Jul 20 '05 #1
5 4022
*Grayle* <tt*****@ubgxrl.arg.nh>:

<div class="nav">
<!--[if IE]><div class="crapnav"> <![endif]-->

in my HTML to point to different classes in my CSS, the only difference
between which is that one uses position:fixed and the other uses
position:absolute to keep the menu at the top of the page.


Why don't you include an extra stylesheet for IE with Conditional Comments
instead, which then overwrites "position:fixed" with "position:absolute" for
the one class? Your HTML would be less clumsy.
You could of course use CSS hacks instead, moving the clumsiness into the
one remaining CSS.

--
To the optimist, the glass is half full.
To the pessimist, the glass is half empty.
To the engineer, the glass is twice as big as it needs to be.
Jul 20 '05 #2
*Grayle* <tt*****@ubgxrl.arg.nh>:

Where's .nh, btw.?
<div class="nav">
<!--[if IE]><div class="crapnav"> <![endif]-->


Why don't you include an extra stylesheet for IE with Conditional Comments


I think you're suggesting I use
some sort of browser sniffing and serve a CSS file based on that?


You're already doing that with the so-called Conditional Comments. I only
suggest that you use it to link the stylesheet instead.

<!--[if lte IE6]><link rel="stylesheet" href="ie.css"> <![endif]-->

and _no_

<!--[if IE]><div class="crapnav"> <![endif]-->.

Personally I don't think CSS browser bugs were worth to mess up your HTML
documents with e.g. CCs, but let's not elaborate on that again.

--
"Music is essentially useless, as life is."
George Santayana
Jul 20 '05 #3
In article <be***********@ariadne.rz.tu-clausthal.de>, cr*****@gmx.net
says...
*Grayle* <tt*****@ubgxrl.arg.nh>:

Where's .nh, btw.?
Ooops. Forgot to include sig line. That addy is rot13'd.
<div class="nav">
<!--[if IE]><div class="crapnav"> <![endif]-->

Why don't you include an extra stylesheet for IE with Conditional Comments
I think you're suggesting I use
some sort of browser sniffing and serve a CSS file based on that?


You're already doing that with the so-called Conditional Comments. I only
suggest that you use it to link the stylesheet instead.

<!--[if lte IE6]><link rel="stylesheet" href="ie.css"> <![endif]-->

Aahh. I'd never seen that. So I put that in the <head> ? Whats the 'lte'
bit mean? And why specify IE6? and _no_

<!--[if IE]><div class="crapnav"> <![endif]-->. understood.
Personally I don't think CSS browser bugs were worth to mess up your HTML
documents with e.g. CCs, but let's not elaborate on that again.
Sorry, I can't make sense of that sentence. Thanks for taking the time
to help me with this.


--
tt*****@ubgxrl.arg.nh
Email addy ROT13'd
Jul 20 '05 #4
Jeroen Sangers wrote:
Grayle wrote:
In article <be***********@ariadne.rz.tu-clausthal.de>, cr*****@gmx.net
<!--[if lte IE6]><link rel="stylesheet" href="ie.css"> <![endif]-->


Aahh. I'd never seen that. So I put that in the <head> ? Whats the
'lte' bit mean? And why specify IE6?
and _no_

<!--[if IE]><div class="crapnav"> <![endif]-->.

lte IE6 means less than or equal to IE6. I guess this was used in the
hope that Microsoft will get it right in version 7....


....which won't be available as a standalone browser:

http://www.microsoft.com/technet/tre.../ie/ie0507.asp

I don't believe Microsoft would admit to mistakes. Look at the
incredible arrogance in the use of "downlevel browser" on this page:

http://msdn.microsoft.com/workshop/a...omment_ovw.asp

"downlevel browser - Any browser except for Internet Explorer 5 and
later versions."

--
Mark.
http://www.tranchant.freeserve.co.uk/

Jul 20 '05 #5
In article <bf************@ID-175276.news.uni-berlin.de>,
nn**@jeroensangers.com says...

lte IE6 means less than or equal to IE6. I guess this was used in the
hope that Microsoft will get it right in version 7....

Thanks for that.
--
tt*****@ubgxrl.arg.nh
Email addy ROT13'd
Jul 20 '05 #6

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

Similar topics

2
2768
by: Patrice | last post by:
There seems to be a bug with the events mouseOut and mouseOver of divs when their position is fixed : when you enter the div with the mouse, three events are fired in this order : over, out, over....
9
17700
by: Paul Trautwein | last post by:
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...
4
5866
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
3438
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
2920
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...
11
10365
by: Mathias Wrede | last post by:
Hi, is there anybody who can give me a hint?. I would like to create a fixed positioned navigation area. There are no probs with correct working browsers (FF, Opera, Konqueror etc.). The...
2
9748
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...
5
3261
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
2455
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
7212
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
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
7364
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...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5604
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4696
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1524
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
405
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.