473,785 Members | 2,811 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:absolu te 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 4031
*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:absolu te 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:absol ute" 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**@jeroensang ers.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
2795
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. It works as expected with IE6. Is this a known problem ? Is there any workaround ? Patrice
9
17709
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 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.
4
5878
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 is causing problems as can be expected since I have used position:fixed. I don't want to use too many hacks and I don't care that the page looks a bit different in IE (their loss) but I want it to be usable.
5
3461
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 url please? My partner is looking to make the top-right graphic stay in view as the reader scrolls down the page: <http://www.solitarytrees.net/trees.htm>
7
2934
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 display, and then to get hidden. If I use position:absolute, the problem goes away, but the tooltips move around with the containing, scrolling div. ..scroll { height: 400px; overflow: auto; }
11
10384
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 feature is switched off in IE<=6 - that's ok for me. Now I want to activate this function for IE7. Example: <http://www.abitos.de/demo/cascada-schmuck.de/index.html>
2
9763
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 new web pages? -- http://www.ericlindsay.com
5
3287
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 off the page. Can somebody advise me as to how to apply the appropriate padding (when i change the "em" values it seems to have no effect). Thank you. #loading {
8
2470
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 "Show" and then scroll up and down to see what I mean. It is supposed to stay in the same place in the window. We got the coding from somewhere online.
0
9645
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10147
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10090
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9949
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8971
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6739
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4050
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 we have to send another system
3
2879
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.