473,398 Members | 2,403 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,398 software developers and data experts.

How to fix elements in IE

Hi there,

please check out this page:

http://nadine-timo.de/hsm/index.html

In most browsers the menu and the top line are _fixed_. Who knows how to
tell Internet Explorer to do so?

Thanks in advance
Marco
--
Please change the subject to "NEWSMAIL" in your emails.
Jul 20 '05 #1
30 2912
On Mon, 24 May 2004 01:05:52 +0200, M. Ney wrote:
http://nadine-timo.de/hsm/index.html

In most browsers the menu and the top line are _fixed_. Who knows how to
tell Internet Explorer to do so?


I think the 'problem' is this line..
#kopfzeile {
position:fixed;

IE does not recognise 'position: fixed', AFAIU.
(and the problem is IE, not the style)

BTW ..be a nice chap and define an alt
tag for the image on line 66, eh?
(Even if simply alt="")

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 20 '05 #2
Andrew Thompson <Se********@www.invalid> wrote:
IE does not recognise 'position: fixed', AFAIU.
(and the problem is IE, not the style)
I know, but how to react?
BTW ..be a nice chap and define an alt
tag for the image on line 66, eh?
(Even if simply alt="")


I'll fix that before the site goes official.
--
Please change the subject to "NEWSMAIL" in your emails.
Jul 20 '05 #3
On Mon, 24 May 2004 08:16:38 +0200, M. Ney <m.***@gmx.net> wrote:
Andrew Thompson <Se********@www.invalid> wrote:
IE does not recognise 'position: fixed', AFAIU.
(and the problem is IE, not the style)


I know, but how to react?


There's only one way to achieve the "fixed" rendering in IE, and it
involves the optional Javascript. It's not reliable for all users, most
notably Google, so ultimately you're stuck.

Design the page so that it degrades in IE in an acceptable fashion.
Jul 20 '05 #4
m.***@gmx.net (M. Ney) wrote:
Hi there,

please check out this page:

http://nadine-timo.de/hsm/index.html

In most browsers the menu and the top line are _fixed_. Who knows how to
tell Internet Explorer to do so?


Not without javascript. Simple scrolltop kind of thing with callback
polling. You'd set offsets for the top bar and your nav menu. It would
work fine, automatically. The rest would 'flow underneath' and not
even know the two blocks are there. Depending on what you have on
site, a simple horizontal line menu might be preferable, as well as a
much smaller title block - but . . But IE does NOT support FIXED, as
far as I know.
Jul 20 '05 #5
Neal <ne*****@yahoo.com> wrote:
There's only one way to achieve the "fixed" rendering in IE, and it
involves the optional Javascript. It's not reliable for all users, most
notably Google, so ultimately you're stuck.


Since when does Google care about the usage of js for presentational
effects?

--
Spartanicus
Jul 20 '05 #6
M. Ney wrote:
Andrew Thompson <Se********@www.invalid> wrote:
IE does not recognise 'position: fixed', AFAIU. (and the problem is
IE, not the style)


I know, but how to react?


Use parsing bugs in browsers to protect them.
/* the following is understood by Moz, O, IE5+, Safari, etc */
..myelement { position: absolute; }

/* fix for IE, which cannot parse child selector with no spaces */
/* this is understood by Moz, O, Safari, and others */
html>body .myelement { position: fixed; }

If you have links in the fixed part, then you should probably hide it
from IE5/Mac, too. It can fix elements, but the cursor does not change
on :link:hover for links inside a fixed section.

@media screen { /* hide from IE 5 Mac using media rule */
HTML>BODY .myelement { /* hide from IE Win as above */
position: fixed;
}
}
HTH
--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #7
On Mon, 24 May 2004 09:07:31 +0100, Spartanicus <me@privacy.net> wrote:
Neal <ne*****@yahoo.com> wrote:
There's only one way to achieve the "fixed" rendering in IE, and it
involves the optional Javascript. It's not reliable for all users, most
notably Google, so ultimately you're stuck.


Since when does Google care about the usage of js for presentational
effects?

You are correct - but nonetheless it's a good habit to avoid Js unless you
are positive it will not interfere with page use. Google wouldn't be
bothered by this usage, but the next time... Call it an error of caution.
Jul 20 '05 #8
Neal <ne*****@yahoo.com> wrote:
There's only one way to achieve the "fixed" rendering in IE, and it
involves the optional Javascript. It's not reliable for all users, most
notably Google, so ultimately you're stuck.


Since when does Google care about the usage of js for presentational
effects?


You are correct - but nonetheless it's a good habit to avoid Js unless you
are positive it will not interfere with page use. Google wouldn't be
bothered by this usage, but the next time... Call it an error of caution.


Most of us have no difficulty understanding the way javascript should be
used without the need to refer to it as if it was some magical monster
that can leap at you from the dark.

--
Spartanicus
Jul 20 '05 #9
Brian <us*****@julietremblay.com.invalid> wrote:
M. Ney wrote:
Andrew Thompson <Se********@www.invalid> wrote:
IE does not recognise 'position: fixed', AFAIU. (and the problem is
IE, not the style)
I know, but how to react?
Use parsing bugs in browsers to protect them. If you have links in the fixed part, then you should probably hide it
from IE5/Mac, too. It can fix elements, but the cursor does not change
on :link:hover for links inside a fixed section.


After downloading Firefox 0.8, I see that the rendering differences
between mozilla and IE are SO great, that it further justifies my
approach of routing different browsers to entirely different style
sheets.

Jul 20 '05 #10
Ok,

I may use Javascript, it will work fine.

But if a user switches JS off for security reasons, my page design will
be killed!
--
Please change the subject to "NEWSMAIL" in your emails.
Jul 20 '05 #11
> http://nadine-timo.de/hsm/index.html

My brother destroyed the Link by accident.

It should work within the next hour!
--
Please change the subject to "NEWSMAIL" in your emails.
Jul 20 '05 #12
m.***@gmx.net (M. Ney) wrote:
Ok,

I may use Javascript, it will work fine.
What will work fine? (hint: quote)
But if a user switches JS off for security reasons, my page design will
be killed!


(after having read back in the thread due to missing quotes)

1) My remark to Neal should not be read as endorsement for this
particular usage, it merely addressed a flaw in his statement regarding
javascript usage.

2) Usage of position:fixed and a js hack to achieve the same effect in
IE is no reason why the display should be messed up if js is not enabled
(hint: code a fallback to position:absolute).

--
Spartanicus
Jul 20 '05 #13
On Mon, 24 May 2004 23:52:14 +0100, Spartanicus wrote:

( ..position:fixed -> IE/JS -> IE/position:absolute )
2) Usage of position:fixed and a js hack to achieve the same effect in
IE is no reason why the display should be messed up if js is not enabled
(hint: code a fallback to position:absolute).


Great idea! I might play with that
concept soon if I get a free moment..

[ I have always liked the 'fixed'
positioning but held back because
of IE's deficencies.. ]

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 20 '05 #14
On Tue, 25 May 2004 01:14:19 GMT, Andrew Thompson <Se********@www.invalid>
wrote:
[ I have always liked the 'fixed'
positioning but held back because
of IE's deficencies.. ]


Be aware that one of the pitfalls of fixed is that if the element has any
appreciable height, the content may be lost at some viewport sizes. I used
to like fixed, but the possibility of having content lost - especially as
the most likely candidate for fixed is a navigation division - cured me
quick.
Jul 20 '05 #15
On Mon, 24 May 2004 23:28:18 -0400, Neal wrote:
On Tue, 25 May 2004 01:14:19 GMT, Andrew Thompson wrote:
[ I have always liked the 'fixed' positioning
... Be aware that one of the pitfalls of fixed is that if the element has any
appreciable height, the content may be lost at some viewport sizes.


Lose my content?! Definitely something
that would require investigation.

I like 'squeezy' pages where possible,
and like them to be useable if the visitor
can only give my page half the screen width.

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 20 '05 #16
On Tue, 25 May 2004 03:36:40 GMT, Andrew Thompson <Se********@www.invalid>
wrote:
Lose my content?! Definitely something
that would require investigation.

I like 'squeezy' pages where possible,
and like them to be useable if the visitor
can only give my page half the screen width.


It's the width AND the height. Width will wrap. Height cannot.
Jul 20 '05 #17
Andrew Thompson <Se********@www.invalid> wrote:
I like 'squeezy' pages where possible,
and like them to be useable if the visitor
can only give my page half the screen width.


But as I wrote, before, why not just line menus, which are so common,
now? Just keep a line menu at the top, centered. If the jscript is
off, no big deal. Your viewer will have to use the sliders, the
scrollbars, to get back to the nav at the top. That's their choice.
That's how they want it.

Jul 20 '05 #18
M. Ney wrote:
Hi there,

please check out this page:
http://nadine-timo.de/hsm/index.html

In most browsers the menu and the top line are _fixed_. Who knows how
to tell Internet Explorer to do so?


It is certainly possible, in some cases, to get the effect of { position:
fixed } in IE without using Javascript. I got help elsewhere and also used
information at the following page:
http://devnull.tagsoup.com/fixed/

Here are a couple of experiments I did. (Valid HTML 4.01 Strict).

In this case, the boxes you see are actually the cells of a table. The CSS
takes the table apart & sticks the cells to the sides of the viewport.
http://www.barry.pearson.name/articl.../exhibit05.htm

In this case, there are sidebars that remain fixed, *but* not in versions of
IE before IE 6. (I haven't yet managed to do it in earlier versions).
http://www.barry.pearson.name/articl.../fixed_bar.htm

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #19
"Barry Pearson" <ne**@childsupportanalysis.co.uk> wrote:
In this case, the boxes you see are actually the cells of a table. The CSS
takes the table apart & sticks the cells to the sides of the viewport.
http://www.barry.pearson.name/articl.../exhibit05.htm

In this case, there are sidebars that remain fixed, *but* not in versions of
IE before IE 6. (I haven't yet managed to do it in earlier versions).
http://www.barry.pearson.name/articl.../fixed_bar.htm


Is there a net advantage, however, to this over a simple 10-line
javascript callback which would work in all versions of IE, and other
browsers? In addition, doesn't it thrown things off to set HTML and
BODY in this way?

Jul 20 '05 #20

"M. Ney" <m.***@gmx.net> wrote in message
news:1ge9m7q.19l7g4k1b60w64N%m.***@gmx.net...
Hi there,

please check out this page:

http://nadine-timo.de/hsm/index.html

In most browsers the menu and the top line are _fixed_. Who knows how to
tell Internet Explorer to do so?
Try setting position: absolute
then define top and left px coordinates for the top left corner of the
object whose position you wish to fix.

You may also have to define positioning and occasionally size in some other
objects as well...

=~=
Timothy Casey
South Australia
wo****@iprimus.com.au

Formerly:
ca***@smart.net.au

Phenomenal Speed Comprehension:
Discover the World's most advanced speed reading application at:
http://www.fieldcraft.biz/shop/


Thanks in advance
Marco
--
Please change the subject to "NEWSMAIL" in your emails.

Jul 20 '05 #21
Mark Johnson wrote:
"Barry Pearson" <ne**@childsupportanalysis.co.uk> wrote:
In this case, the boxes you see are actually the cells of a table.
The CSS takes the table apart & sticks the cells to the sides of the
viewport.
http://www.barry.pearson.name/articl.../exhibit05.htm

In this case, there are sidebars that remain fixed, *but* not in
versions of IE before IE 6. (I haven't yet managed to do it in
earlier versions).
http://www.barry.pearson.name/articl.../fixed_bar.htm
Is there a net advantage, however, to this over a simple 10-line
javascript callback which would work in all versions of IE, and other
browsers?


I can't make a decision for anyone else. Without a pure-CSS method that works
for IE 5, I would probably go for the Javascript. But with such a pure-CSS
method, I would probably go for it, if only because the user is more likely to
have CSS than Javascript.
In addition, doesn't it thrown things off to set HTML and
BODY in this way?


Ask me next year! I'm currently trying to understand the implications of such
html & body rules. It isn't simply what they *do*. I am struggling to
understand what they *mean*. I'm unclear when you should use one and when the
other.

--
Barry Pearson
http://www.Barry.Pearson.name/photography/
http://www.BirdsAndAnimals.info/
http://www.ChildSupportAnalysis.co.uk/
Jul 20 '05 #22
Spartanicus wrote:
m.***@gmx.net (M. Ney) wrote:
I may use Javascript, it will work fine.
What will work fine? (hint: quote)


The site will work fine. (hint: if there's nothing to quote, don't do.)

Just read the subject of this thread!
(after having read back in the thread due to missing quotes)


Many people will remember what a discussion is about, some will have to
read twice..

Marco
..

--
Please change the subject to "NEWSMAIL" in your emails.
Jul 20 '05 #23
Timothy Casey wrote:
Try setting position: absolute
then define top and left px coordinates for the top left corner of the
object whose position you wish to fix.


That's what I did! I defined top and left with either pos:fixed or
absolute. It didn't work..

I will test that another time.

Thanks
Marco
--
Please change the subject to "NEWSMAIL" in your emails.
Jul 20 '05 #24
Spartanicus wrote:
What will work fine? (hint: quote)
M. Ney <m.***@gmx.net> wrote:
The site will work fine. (hint: if there's nothing to quote, don't do.)
What site?
Just read the subject of this thread!
So someone appears to be trying to fix elements in a way that MSIE actually
supports. But what technique works? And what technique(s) didn't work?
(after having read back in the thread due to missing quotes)

Many people will remember what a discussion is about, some will have to
read twice..


And many people will come upon your context-free post first, and will have
no idea what you're talking about. The other messages in the thread may not
be on the server. Or the newsreader may not present the messages as a
thread.

Many people will not have read the previous posts. I certainly don't read
everything posted to the comp.infosystems.www.authoring.* groups. The
killfile is your friend, and all that.
--
Darin McGrew, da***@TheRallyeClub.org, http://www.TheRallyeClub.org/
A gimmick car rallye is not a race, but a fun puzzle testing your
ability to follow instructions. Upcoming gimmick car rallye in
Silicon Valley: Best in Show (Saturday, June 5)
Jul 20 '05 #25
M. Ney wrote:
Many people will remember what a discussion is about, some will have to
read twice..


And many people contribute to many, many discussions. Sometimes hundreds
a day.

--
John MexIT: http://johnbokma.com/mexit/
personal page: http://johnbokma.com/
Experienced Perl programmer available: http://castleamber.com/
Jul 20 '05 #26
M. Ney wrote:
Ok,

I may use Javascript, it will work fine.

But if a user switches JS off for security reasons, my page design will
be killed!


Then in the sense of the World Wide Web, your Javascript and your page
design do *not* work.

Actually, security reasons are not the only reason to switch off Javascript
(limiting CPU usage is another reason that comes to mind).

--
Shawn K. Quinn
Jul 20 '05 #27
Shawn K. Quinn wrote:
M. Ney wrote:
I may use Javascript, it will work fine.

But if a user switches JS off for security reasons, my page design will
be killed!


Then in the sense of the World Wide Web, your Javascript and your page
design do *not* work.

Actually, security reasons are not the only reason to switch off Javascript
(limiting CPU usage is another reason that comes to mind).


So the situation is like this:

- Frames have many disadvantages, as listed in this document from 1996:

Why frames suck, http://www.useit.com/alertbox/9612.html

- CSS shows compatibility issues, especially in IE and Netscape/Mozilla

- Javascript isn't activated on every single browser

So what conclusions should be drawn? If you want to have a fixed menu
when the reader scrolls, what should you do?

Ciao
Marco
--
Please change the subject to "NEWSMAIL" in your emails.
Jul 20 '05 #28
M. Ney wrote in
<1g*************************@gmx.net>
Shawn K. Quinn wrote:
M. Ney wrote:
I may use Javascript, it will work fine.

But if a user switches JS off for security reasons, my page design
will be killed!


Then in the sense of the World Wide Web, your Javascript and your
page design do *not* work.

Actually, security reasons are not the only reason to switch off
Javascript (limiting CPU usage is another reason that comes to mind).


So the situation is like this:

- Frames have many disadvantages, as listed in this document from
1996:

Why frames suck, http://www.useit.com/alertbox/9612.html

- CSS shows compatibility issues, especially in IE and
Netscape/Mozilla

- Javascript isn't activated on every single browser

So what conclusions should be drawn? If you want to have a fixed menu
when the reader scrolls, what should you do?


Without being facetious, you could stop wanting to have that feature.

Whilst it may well be an attractive and functional feature of your design,
and one that is hard to abandon after you've worked on it for so long, there
are millions of effective pages out there that get by without it.

--
PeterMcC
If you feel that any of the above is incorrect,
inappropriate or offensive in any way,
please ignore it and accept my apologies.

Jul 20 '05 #29
On Thu, 3 Jun 2004 16:35:06 +0200, M. Ney <m.***@gmx.net> wrote:
If you want to have a fixed menu
when the reader scrolls, what should you do?


Set it up so the div functions as absolute on IE and fixed on supporting
browsers. If the UA cannot support fixed, it will still work, although not
as desired.
Jul 20 '05 #30
M. Ney wrote:
If you want to have a fixed menu when the reader scrolls, what
should you do?


Stop wanting that, at least as a requirement of the design. In
general, when writing web documents, you'll be more successful if you
can let go of the presentation a bit.

--
Brian (remove ".invalid" to email me)

Jul 20 '05 #31

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

Similar topics

19
by: deko | last post by:
I'm kind of lost on this one - I need to modify 2 files based on user input: $data_array = file($data_file); $counter_array = file($counter_file); // There is a line-for-line relationship...
1
by: Wolfgang Lipp | last post by:
my question is: do we need container elements for repeating elements in data-centric xml documents? or is it for some reason very advisable to introduce containers in xml documents even where not...
0
by: Wolfgang Lipp | last post by:
From: Lipp, Wolfgang Sent: Tuesday, 27?January?2004 13:26 <annotation> the first eleven contributions in this thread started as an off-list email discussion; i have posted them here with...
8
by: Generic Usenet Account | last post by:
To settle the dispute regarding what happens when an "erase" method is invoked on an STL container (i.e. whether the element is merely removed from the container or whether it also gets deleted in...
22
by: Luke | last post by:
Elements with name attribute: form, input, textarea, a, frame, iframe, button, select, map, meta, applet, object, param, img (if you know more reply...) Methods of addresing html elements:...
6
by: Jakub.Bednarczuk | last post by:
Hallo everybody I have the problem with getting attributes values and also attributes names. I am reading an xml file with DOM. Lets see an example: file I read <root> <Def></Def>...
4
by: Beagle804 | last post by:
OK. I'm very new to Javascript and what I've learned so far has been find snippets of code on the web and using them in my php programs. I put together an application that allows a Reset button to...
2
by: mars123 | last post by:
hi, I am facing a js error in my code, below is the prob. statement I have a radio2 javascript function as below, it works like this.. When a parent radio button is selected only one of its...
37
by: Prisoner at War | last post by:
Actually, it doesn't have to be a blockquote...but I'm at my wits' end: I want to make bold several lines of text which have a pair of <br /tags between them...seems like the <b></bdo not "carry...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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
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...
0
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
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...

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.