Opera problems, take 2

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob Richardson

    Opera problems, take 2

    After making corrections, and passing the WC3 validation checks for the web
    page and the CSS, I'm still having problems ... only with Opera (7.54 and
    8.0) at:



    This works perfectly on Firefox, Netscape, and Mozilla, and works on IE with
    that little wobble motion that we all know. In Opera, the navbar moves up
    when you scroll down. Any one have a clue how to solve this?

    The relevant embedded CSS is:

    <style type="text/css">
    <!--
    #moveNav { position: absolute; left: 0px; top: 0px; }
    body > div#moveNav { position: fixed; }
    -->
    </style>

    <!--[if gte IE 5.5]>
    <style type="text/css">
    div#moveNav {
    left: expression( ( 0 + ( ignoreMe2 = document.docume ntElement.scrol lLeft ?
    document.docume ntElement.scrol lLeft : document.body.s crollLeft ) ) + 'px' );
    top: expression( ( 0 + ( ignoreMe = document.docume ntElement.scrol lTop ?
    document.docume ntElement.scrol lTop : document.body.s crollTop ) ) + 'px' );
    }
    </style>
    <![endif]-->

    <div id="moveNav">
    etc. this is where the navbar goes




  • Steve Pugh

    #2
    Re: Opera problems, take 2


    Bob Richardson wrote:[color=blue]
    > After making corrections, and passing the WC3 validation checks for[/color]
    the web[color=blue]
    > page and the CSS, I'm still having problems ... only with Opera (7.54[/color]
    and[color=blue]
    > 8.0) at:
    >
    > http://www.writeonwhidbey.org/_priva...sitestBOB.html
    >
    > This works perfectly on Firefox, Netscape, and Mozilla, and works on[/color]
    IE with[color=blue]
    > that little wobble motion that we all know. In Opera, the navbar[/color]
    moves up[color=blue]
    > when you scroll down. Any one have a clue how to solve this?
    >
    > The relevant embedded CSS is:
    >
    > <style type="text/css">
    > <!--
    > #moveNav { position: absolute; left: 0px; top: 0px; }
    > body > div#moveNav { position: fixed; }
    > -->
    > </style>[/color]

    If I change
    body > div#moveNav { position: fixed; }
    to
    div#moveNav { position: fixed; }
    then it works in Opera.

    (a) this seems like a bug, create a minimal test case and report it to
    Opera.
    (b) the workaround is easy as I don't think you need the body >
    selector at all in this case.

    Steve

    Comment

    • Spartanicus

      #3
      Re: Opera problems, take 2

      "Bob Richardson" <bobr at whidbey dot com> wrote:
      [color=blue]
      >After making corrections, and passing the WC3 validation checks for the web
      >page and the CSS, I'm still having problems ... only with Opera (7.54 and
      >8.0) at:
      >
      >http://www.writeonwhidbey.org/_priva...sitestBOB.html
      >
      >This works perfectly on Firefox, Netscape, and Mozilla, and works on IE with
      >that little wobble motion that we all know. In Opera, the navbar moves up
      >when you scroll down. Any one have a clue how to solve this?[/color]

      You are using this child selector construct: body > div#moveNav, but
      div#moveNav is not a child of the body element.

      Btw, it may now validate but you are serving invalid html to IE with the
      incorrect placing of the IE conditional comment positioned inside the
      body.

      Btw2, omit the white space around the child selector to hide stuff from
      IE.

      --
      Spartanicus

      Comment

      • Bob Richardson

        #4
        Re: Opera problems, take 2


        "Steve Pugh" <steve@pugh.net > wrote in message
        news:1114186661 .017650.210750@ o13g2000cwo.goo glegroups.com.. .[color=blue]
        >
        > Bob Richardson wrote:[color=green]
        >> After making corrections, and passing the WC3 validation checks for[/color]
        > the web[color=green]
        >> page and the CSS, I'm still having problems ... only with Opera (7.54[/color]
        > and[color=green]
        >> 8.0) at:
        >>
        >> http://www.writeonwhidbey.org/_priva...sitestBOB.html
        >>
        >> This works perfectly on Firefox, Netscape, and Mozilla, and works on[/color]
        > IE with[color=green]
        >> that little wobble motion that we all know. In Opera, the navbar[/color]
        > moves up[color=green]
        >> when you scroll down. Any one have a clue how to solve this?
        >>
        >> The relevant embedded CSS is:
        >>
        >> <style type="text/css">
        >> <!--
        >> #moveNav { position: absolute; left: 0px; top: 0px; }
        >> body > div#moveNav { position: fixed; }
        >> -->
        >> </style>[/color]
        >
        > If I change
        > body > div#moveNav { position: fixed; }
        > to
        > div#moveNav { position: fixed; }
        > then it works in Opera.
        >
        > (a) this seems like a bug, create a minimal test case and report it to
        > Opera.
        > (b) the workaround is easy as I don't think you need the body >
        > selector at all in this case.
        >[/color]

        It may work in Opera, but no longer works in IE with this change :( I
        realize that IE has a bug but I have to do what's necessary to satisfy 80%
        of the users with IE. If it's a choice or doing it wrong to satisfy 80% of
        the users, or doing it right for 5%, I've got to go with the 80%. At least
        Firefox, Mozilla, and Netscape work correctly.


        Comment

        • Kevin Wu Won

          #5
          Re: Opera problems, take 2

          >> If I change[color=blue][color=green]
          >> body > div#moveNav { position: fixed; }
          >> to
          >> div#moveNav { position: fixed; }
          >> then it works in Opera.[/color]
          >
          > It may work in Opera, but no longer works in IE with this change :([/color]

          Maybe change it to html>body div#moveNav { position: fixed; }?


          --
          Kevin Wu Won exclipy #40979410
          @gmail.com

          Comment

          • Bob Richardson

            #6
            Re: Opera problems, take 2

            Thanks for the suggestions, but it still doesn't work. I'm fairly certain
            that I need to keep position : absolute in order for IE to work. And the
            only way that Opera will work is to have position : fixed.

            "Kevin Wu Won" <s4097941@uq.st udent> wrote in message
            news:op.sppk5ti 4h28aeg@emc-c23-117.resnet.uq.e du.au...[color=blue][color=green][color=darkred]
            >>> If I change
            >>> body > div#moveNav { position: fixed; }
            >>> to
            >>> div#moveNav { position: fixed; }
            >>> then it works in Opera.[/color]
            >>
            >> It may work in Opera, but no longer works in IE with this change :([/color]
            >
            > Maybe change it to html>body div#moveNav { position: fixed; }?
            >
            >
            > --
            > Kevin Wu Won exclipy #40979410
            > @gmail.com[/color]


            Comment

            • Steve Pugh

              #7
              Re: Opera problems, take 2

              "Bob Richardson" <bobr at whidbey dot com> wrote:
              [color=blue]
              >Thanks for the suggestions, but it still doesn't work. I'm fairly certain
              >that I need to keep position : absolute in order for IE to work. And the
              >only way that Opera will work is to have position : fixed.[/color]

              Yes. The best possiblity is to put the position: absolute inside the
              IE conditional comment so only the browser that needs it gets it. As
              you've place the cc last any styles within it will over ride those
              before it so long as the selectors have equal specificity.

              Steve

              --
              "My theories appal you, my heresies outrage you,
              I never answer letters and you don't like my tie." - The Doctor

              Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>

              Comment

              • Bob Richardson

                #8
                Re: Opera problems, take 2 the solution


                "Kevin Wu Won" <s4097941@uq.st udent> wrote in message
                news:op.sppk5ti 4h28aeg@emc-c23-117.resnet.uq.e du.au...[color=blue][color=green][color=darkred]
                >>> If I change
                >>> body > div#moveNav { position: fixed; }
                >>> to
                >>> div#moveNav { position: fixed; }
                >>> then it works in Opera.[/color]
                >>
                >> It may work in Opera, but no longer works in IE with this change :([/color]
                >
                > Maybe change it to html>body div#moveNav { position: fixed; }?[/color]

                I got it to work in all browsers now. Below you can see the code that
                "works" in Opera and the others, (I hesitate to say the "correct code") I've
                also included a comment line showing the code I was originally using that
                does not work.

                <style type="text/css"><!--
                #moveNavIE { position: absolute; }
                /*#moveNavIE { position: absolute; left: 0px; top: 0px; }*/
                --></style>

                For some strange reason, assigning the left and top at 0px caused the
                failure - only in Opera. Anyone have a clue why, or is this just a minor
                Opera bug.

                BTW, this code works fine in the <body> as well as the <head>, although it
                really should be put in the <head>.


                Comment

                • Bob Richardson

                  #9
                  Re: Opera problems, take 2

                  I liked this idea, but it didn't work for me. Is it possible that Opera
                  looks at the conditional comment? I'd hate to think so.

                  "Steve Pugh" <steve@pugh.net > wrote in message
                  news:lqsn61lli8 4pdup0ch3t1ongu 3smeh6ugr@4ax.c om...[color=blue]
                  > "Bob Richardson" <bobr at whidbey dot com> wrote:
                  >[color=green]
                  >>Thanks for the suggestions, but it still doesn't work. I'm fairly certain
                  >>that I need to keep position : absolute in order for IE to work. And the
                  >>only way that Opera will work is to have position : fixed.[/color]
                  >
                  > Yes. The best possiblity is to put the position: absolute inside the
                  > IE conditional comment so only the browser that needs it gets it. As
                  > you've place the cc last any styles within it will over ride those
                  > before it so long as the selectors have equal specificity.
                  >
                  > Steve
                  >
                  > --
                  > "My theories appal you, my heresies outrage you,
                  > I never answer letters and you don't like my tie." - The Doctor
                  >
                  > Steve Pugh <steve@pugh.net > <http://steve.pugh.net/>[/color]


                  Comment

                  Working...