Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Location
    Bristol, UK
    Posts
    932
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet Explorer quickie about position

    ho hum, I am using position: fixed which works lovely in mozilla but of course not in IE...

    ...but I don't want to have to use position: absolute. Neither can I allow IE to interpret position: fixed as anything other than absolute.

    Is there a quick way, using CSS only, to tell IE to bog off and use absolute, while allowing mozilla to use fixed?

    Cheers

    ::] krycek [::
    ithium | SOAPI | SDP | PTPScript manual
    "ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,649
    Thanks
    1
    Thanked 0 Times in 0 Posts
    This smells like a javascript.

    I wouldn't design only for low-use browsers rather the most popular in use today and anything else 2ndly.
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #3
    Regular Coder
    Join Date
    Nov 2002
    Location
    Bristol, UK
    Posts
    932
    Thanks
    0
    Thanked 0 Times in 0 Posts
    lol

    you must have missed my other threads about moz and ie thanks all the same

    nah, I am just wondering if there is a simple way to do this, otherwise I will keep it to absolute. I know IE can't do fixed without JS - I said so when I posted. All I am after is an IE CSS hack, if there is one, to let IE have the absolute value, and mozilla the fixed.

    anyone?

    ::] krycek [::
    ithium | SOAPI | SDP | PTPScript manual
    "ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."

  • #4
    Senior Coder
    Join Date
    Aug 2002
    Posts
    3,467
    Thanks
    0
    Thanked 0 Times in 0 Posts
    My Site | fValidate | My Brainbench | MSDN | Gecko | xBrowser DOM | PHP | Ars | PVP
    “Minds are like parachutes. They don't work unless they are open”
    “Maturity is simply knowing when to not be immature”

  • #5
    Regular Coder
    Join Date
    Nov 2002
    Location
    Bristol, UK
    Posts
    932
    Thanks
    0
    Thanked 0 Times in 0 Posts
    cool, thanks beetle!!!

    pity the bit about IE 6 doesn;t work though - but the rest does

    ::] krycek [::
    ithium | SOAPI | SDP | PTPScript manual
    "ithium is a non-profit webhost, which is pretty much unique. The mission of ithium is to provide free hosting resources for worthwhile and needy non-profit projects, which otherwise may not be able to obtain such facilities. The money from commercial customers goes to maintain ithium's servers and further development."

  • #6
    Regular Coder
    Join Date
    Jun 2002
    Posts
    185
    Thanks
    0
    Thanked 0 Times in 0 Posts
    IE doesn't recognize some CSS selector patterns, so you could use something like:

    .myAbs {
    position: absolute;
    }

    .myFixed > .myAbs {
    position:fixed;
    }

    Then wrap an extra DIV tag around the element you want to position:

    <div class="myFixed">
    <div class="myAbs">Fixed element.</div>
    </div>

    "X > Y" means Y is a child element of X. You can use tag names, class names or ids or whatever for X and Y.

    IE doesn't get the ">" part so it will ignore that rule and just apply the first one, making the inner DIV absolute. Mozilla will recognize the second rule, which overrides the first, making the inner DIV fixed.

  • #7
    Regular Coder
    Join Date
    Sep 2002
    Location
    self.location
    Posts
    181
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Krycek, if conformance is not required, you can just have the one DIV and use this:

    <style>
    <!--
    div.fix {position:absolute}
    -->
    </style>

    <comment>
    <style>
    <!--
    div.fix {position:fixed}
    -->
    </style>
    </comment>


    Browsers other than IE will implement the second style, which IE ignores (using only the first style).


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •