473,385 Members | 1,553 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,385 software developers and data experts.

IE workaround for position:fixed

Guys at comp.infosystems.www.authoring.stylesheets,

I have designed a page [1] 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.

May aim is to get the page to work in IE as in the browsers above with
the change that in IE, everything scrolls. The page should be
resizeable in width but still have a maximum width. Content in the menu
should wrap as it does in O/FB.

I have the following problems which I hope some of you may help me
with:

* I have made an invisible DIV (visible for IE - <DIV id="ie">) to
indent the top menu - <DIV class="menu"> (which is
position:fixed) as much as the <DIV class="trans"> below it
holding the body text (which is position:absolute).

* I have also duplicated the background image onto a DIV to get the
positioning of the <DIV menu> correct from the top of the page.
The structure of the DIVs is then thus:
<DIV nowrap>
<DIV transparent except IE></DIV transparent>
<DIV menu></DIV menu>
</DIV nowrap>
<DIV trans [i.e. body]></DIV trans>

Q 1: I cannot seem to prevent the 2 DIVs (not their content but the
2 DIV blocks themselves) in the DIV nowrap from wrapping which
I do not want them to.

Any suggestions?

* The logo I have put on top of the page duplicating the backgound
image seems to have some transparent pixels around it (you'll
notice them when scrolling).

Q 2: Is this avoidable?

* The content in the <DIV menu> itself does not wrap.

Q 3: Why?

* I also have a problem with the partial transparency of the <DIV
class="trans"> using the "filter:
progid:DXImageTransform.Microsoft.Alpha(opacity = 95);" hack
which seems to make the transparent area blue-ish grey.

Q4: Is this normal for partial transparency in IE?

Thank you all for help, hints and suggestions.

-----

[1] <http://www.dir-dk.org/udstyr/regulatorer.html>
FYI: The language is Danish and the page is about diving.

--
<author> Peter Fjelsten </author>
<e-mail valid> yes </e-mail valid>

Jul 20 '05 #1
4 5859
Peter Fjelsten <no****@adr.dk> wrote:
[1] <http://www.dir-dk.org/udstyr/regulatorer.html> I have designed a page [1] 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.

May aim is to get the page to work in IE as in the browsers above with
the change that in IE, everything scrolls. The page should be
resizeable in width but still have a maximum width. Content in the menu
should wrap as it does in O/FB.

I have the following problems which I hope some of you may help me
with:

* I have made an invisible DIV (visible for IE - <DIV id="ie">) to
indent the top menu - <DIV class="menu"> (which is
position:fixed) as much as the <DIV class="trans"> below it
holding the body text (which is position:absolute).


I don't understand what the problem is, there should be no need to hide
divs, simply use a css hack to feed IE position:absolute, and feed other
UAs position:fixed.

Theoretically you could use:
div.class{position:absolute;position:fixed}

A standard compliant UA that doesn't support position:fixed should
ignore it and use position:absolute, alas IE apparently thinks it
supports position:fixed, thus you have to use a css hack.

You've created something strange though, is this the way it is supposed
to look in IE: http://www.spartanicus.utvinternet.ie/test/peter_ie.png
or Opera: http://www.spartanicus.utvinternet.i...eter_opera.png
?

--
Spartanicus
Jul 20 '05 #2
Spartanicus wrote in Message-ID:
<q3********************************@news.spartanic us.utvinternet.ie>:
I don't understand what the problem is, there should be no need to
hide divs, simply use a css hack to feed IE position:absolute, and
feed other UAs position:fixed. Theoretically you could use:
div.class{position:absolute;position:fixed} A standard compliant UA that doesn't support position:fixed should
ignore it and use position:absolute, alas IE apparently thinks it
supports position:fixed, thus you have to use a css hack.
What hack would that be? I want no browser sniffer scripts.
You've created something strange though, is this the way it is supposed
to look in IE: http://www.spartanicus.utvinternet.ie/test/peter_ie.png
or Opera: http://www.spartanicus.utvinternet.i...eter_opera.png
?


Good browsers: The menu and the logo is supposed to be fixed at the top
and the main text area should scroll semi-transparently on top of it.
This works here in Opera (checked in (7.5b1) and Firebird (0.8). In
these browsers, the page looks exactly like I want it to be. I just want
to make it usable in IE.

Bad browsers: The whole page should scroll with the main text area
overlapping the logo, semi-transparently. This is giving me problems in
IE.

If I remove the hidden IE-only DIV, the menu is placed further to the
left than the main area DIV. This looks a bit silly but it's OK. So the
hidden DIV (for other browsers than IE does nothing more than setting
the DIV.menu correctly, now that IE does not understand position:fixed.

I still have an issue that the content cannot be resized small than the
_maximum_ width I have set using an IE hack:

width:expression(document.body.clientWidth > (500/12) *
parseInt(document.body.currentStyle.fontSize)?
"40em":
"auto");

Any idea why?

Thank you for you help...

--
<author> Peter Fjelsten </author>
<e-mail valid> yes </e-mail valid>

Jul 20 '05 #3
Peter Fjelsten <no****@adr.dk> wrote:
A standard compliant UA that doesn't support position:fixed should
ignore it and use position:absolute, alas IE apparently thinks it
supports position:fixed, thus you have to use a css hack.


What hack would that be? I want no browser sniffer scripts.


The css child selector hack for example:

div.class{position:absolute} /* understood by IE */
body>div.class{position:fixed} /* understood by proper UAs, not by IE */

--
Spartanicus
Jul 20 '05 #4
Spartanicus wrote in Message-ID:
<rq********************************@news.spartanic us.utvinternet.ie>:
What hack would that be? I want no browser sniffer scripts.
The css child selector hack for example:


I used the "asterisk" hack and not the page looks almost as I want it
to.

If only I could make the semi-transparent area "white transparent"
instead of the "bluish-grey transparent" it is now, I'd be happy.

,----- [ What I have now (the relevant bit of the transparent area) ]
| background-color:#FFFFFF;
| filter: progid:DXImageTransform.Microsoft.Alpha(opacity = 93);
`-----

,----- [ ]
| BODY {
| MARGIN: 0em;
| padding: 0em;
| background-color: #FFFFFF;
| background-repeat: no-repeat;
| background-position: auto, 0px;
| background-attachment: fixed;
| background-image: url(images/bannerbg.png);
| }
`-----

--
<author> Peter Fjelsten </author>
<e-mail valid> yes </e-mail valid>

Jul 20 '05 #5

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

Similar topics

5
by: Grayle | last post by:
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">...
9
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...
5
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
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...
2
by: Eric Lindsay | last post by:
What problems are there in using position: fixed; with left: %; and right: %; to do pages that look like a typical boring framed site. A full width header and a footer and the rest of the content...
11
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
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...
1
by: Tom Cole | last post by:
I've written a small javascript library to help automate Ajax requests and the like. One of the things I want the library to do is display a "Please wait" indicator in the upper right hand corner...
5
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...

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.