HighDots Forums  

position:fixed and IE

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss position:fixed and IE in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Grayle
 
Posts: n/a

Default position:fixed and IE - 07-08-2003 , 09:19 PM






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

Reply With Quote
  #2  
Old   
Christoph Paeper
 
Posts: n/a

Default Re: position:fixed and IE - 07-08-2003 , 09:33 PM






*Grayle* <ttoblyr (AT) ubgxrl (DOT) arg.nh>:
Quote:
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.


Reply With Quote
  #3  
Old   
Christoph Paeper
 
Posts: n/a

Default Re: position:fixed and IE - 07-09-2003 , 09:39 PM



*Grayle* <ttoblyr (AT) ubgxrl (DOT) arg.nh>:

Where's .nh, btw.?

Quote:
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


Reply With Quote
  #4  
Old   
Grayle
 
Posts: n/a

Default Re: position:fixed and IE - 07-12-2003 , 10:01 PM



In article <beijl0$22bf$1 (AT) ariadne (DOT) rz.tu-clausthal.de>, crissov (AT) gmx (DOT) net
says...
Quote:
*Grayle* <ttoblyr (AT) ubgxrl (DOT) arg.nh>:

Where's .nh, btw.?
Ooops. Forgot to include sig line. That addy is rot13'd.
Quote:
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?
Quote:
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.
Quote:
--
ttoblyr (AT) ubgxrl (DOT) arg.nh
Email addy ROT13'd


Reply With Quote
  #5  
Old   
Mark Tranchant
 
Posts: n/a

Default Re: position:fixed and IE - 07-16-2003 , 01:43 AM



Jeroen Sangers wrote:
Quote:
Grayle wrote:

In article <beijl0$22bf$1 (AT) ariadne (DOT) rz.tu-clausthal.de>, crissov (AT) gmx (DOT) 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/



Reply With Quote
  #6  
Old   
Grayle
 
Posts: n/a

Default Re: position:fixed and IE - 07-16-2003 , 07:41 PM



In article <bf1a7l$9htg7$1 (AT) ID-175276 (DOT) news.uni-berlin.de>,
nntp (AT) jeroensangers (DOT) com says...
Quote:
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.
--
ttoblyr (AT) ubgxrl (DOT) arg.nh
Email addy ROT13'd


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.