By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,190 Members | 802 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,190 IT Pros & Developers. It's quick & easy.

position:fixed and IE

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
*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

P: n/a
*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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.