IE 5.5, 6 only OR everything BUT those

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Harlan Messinger

    IE 5.5, 6 only OR everything BUT those

    I've got a form used to enter items to be listed in a web-based
    catalog. In the past, I've instructed the users to enter I and B tags
    (this goes back a while) into the textareas to get italics and bold
    face in the catalog.

    Now I've created a version of the page for IE that uses the
    proprietary contentEditable ="true" attribute on a div , which enables
    the user to enter text into the div and use Ctrl-I and Ctrl-B to
    produce italics and boldfacing. (It permits other formatting too, but
    I'm only interested in these two effects.) I'm using display: none on
    the textarea. The div has an onblur that transfers its current
    contents to the textarea.

    I would like to use this single page on all browsers. On IE, I'd like
    the div to appear and the textarea to be hidden, and vice versa on
    other browsers. Suppose I assign the textarea to a class called "ifIE"
    and the div to a class called "ifNotIE". What kind of kludge will
    result in

    .ifIE { display: block; }
    .ifNotIE {display: none; }

    in IE and

    .ifIE { display: none; }
    .ifNotIE {display: block; }

    elsewhere?

    --
    Harlan Messinger
    Remove the first dot from my e-mail address.
    Veuillez ôter le premier point de mon adresse de courriel.
  • Brian

    #2
    Re: IE 5.5, 6 only OR everything BUT those

    Harlan Messinger wrote:[color=blue]
    > What kind of kludge will result in
    >
    > .ifIE { display: block; }
    > .ifNotIE {display: none; }
    >
    > in IE and
    >
    > .ifIE { display: none; }
    > .ifNotIE {display: block; }
    >
    > elsewhere?[/color]

    I'm not commenting on whether the idea is sound. But to hide css from
    IE, use the child selector.

    ..ifIE { display: block }
    ..ifNotIE { display: none }

    body>div.ifIE { display: none }
    body>div.ifNotI E { display: block}

    --
    Brian (follow directions in my address to email me)


    Seen on the web:
    This page best viewed by coming over to my office and looking at it on
    my monitor.

    Comment

    • Harlan Messinger

      #3
      Re: IE 5.5, 6 only OR everything BUT those

      Brian <usenet2@juliet remblay.com.inv alid-remove-this-part> wrote:
      [color=blue]
      >Harlan Messinger wrote:[color=green]
      >> What kind of kludge will result in
      >>
      >> .ifIE { display: block; }
      >> .ifNotIE {display: none; }
      >>
      >> in IE and
      >>
      >> .ifIE { display: none; }
      >> .ifNotIE {display: block; }
      >>
      >> elsewhere?[/color]
      >
      >I'm not commenting on whether the idea is sound. But to hide css from
      >IE, use the child selector.
      >
      >.ifIE { display: block }
      >.ifNotIE { display: none }
      >
      >body>div.ifI E { display: none }
      >body>div.ifNot IE { display: block}[/color]

      Thanks. Only good till IE 7, though, right? :-)

      --
      Harlan Messinger
      Remove the first dot from my e-mail address.
      Veuillez ôter le premier point de mon adresse de courriel.

      Comment

      • Harlan Messinger

        #4
        Re: IE 5.5, 6 only OR everything BUT those

        Harlan Messinger <hmessinger.rem ovethis@comcast .net> wrote:
        [color=blue]
        >Brian <usenet2@juliet remblay.com.inv alid-remove-this-part> wrote:
        >[color=green]
        >>Harlan Messinger wrote:[color=darkred]
        >>> What kind of kludge will result in
        >>>
        >>> .ifIE { display: block; }
        >>> .ifNotIE {display: none; }
        >>>
        >>> in IE and
        >>>
        >>> .ifIE { display: none; }
        >>> .ifNotIE {display: block; }
        >>>
        >>> elsewhere?[/color]
        >>
        >>I'm not commenting on whether the idea is sound. But to hide css from
        >>IE, use the child selector.
        >>
        >>.ifIE { display: block }
        >>.ifNotIE { display: none }
        >>
        >>body>div.if IE { display: none }
        >>body>div.ifNo tIE { display: block}[/color]
        >
        >Thanks. Only good till IE 7, though, right? :-)[/color]

        Works nicely now with IE6, Mozilla, and Opera. I'm using * instead of
        "body", though, since the items aren't at the top level. There isn't
        any problem with that, is there?

        --
        Harlan Messinger
        Remove the first dot from my e-mail address.
        Veuillez ôter le premier point de mon adresse de courriel.

        Comment

        • Anne van Kesteren

          #5
          Re: IE 5.5, 6 only OR everything BUT those

          Harlan Messinger wrote:
          [color=blue]
          > Works nicely now with IE6, Mozilla, and Opera. I'm using * instead of
          > "body", though, since the items aren't at the top level. There isn't
          > any problem with that, is there?
          >[/color]

          Yes. There is. IE5.0 can give problems ;-)

          Use the parent-element and you are always save.


          --
          Anne van Kesteren
          <http://www.annevankest eren.nl/>

          Comment

          • Stephen Poley

            #6
            Re: IE 5.5, 6 only OR everything BUT those

            On Mon, 26 Jan 2004 22:45:25 -0500, Harlan Messinger
            <hmessinger.rem ovethis@comcast .net> wrote:
            [color=blue]
            >I would like to use this single page on all browsers. On IE, I'd like
            >the div to appear and the textarea to be hidden, and vice versa on
            >other browsers. Suppose I assign the textarea to a class called "ifIE"
            >and the div to a class called "ifNotIE". What kind of kludge will
            >result in
            >
            > .ifIE { display: block; }
            > .ifNotIE {display: none; }
            >
            >in IE and
            >
            > .ifIE { display: none; }
            > .ifNotIE {display: block; }
            >
            >elsewhere?[/color]

            Never used them myself, but there's a beast called IE conditional
            comments which should help. Googling c.i.w.a.* should produce the
            syntax.

            --
            Stephen Poley


            Comment

            • Harlan Messinger

              #7
              Re: IE 5.5, 6 only OR everything BUT those


              "Anne van Kesteren" <mail@annevanke steren.nl> wrote in message
              news:bv8hso$s1j $1@reader08.wxs .nl...[color=blue]
              > Harlan Messinger wrote:
              >[color=green]
              > > Works nicely now with IE6, Mozilla, and Opera. I'm using * instead of
              > > "body", though, since the items aren't at the top level. There isn't
              > > any problem with that, is there?
              > >[/color]
              >
              > Yes. There is. IE5.0 can give problems ;-)
              >
              > Use the parent-element and you are always save.[/color]

              Thanks for the advice. If it turns out to be necessary, I can make the
              selectors more specific. Fortunately, this application is entirely within my
              control, and there are only about half a dozen users! I've already told them
              "it may work in IE 5.5, probably won't work in IE 5, and definitely won't
              work in IE older than that". If that really causes anyone a problem, then I
              can adjust the selectors.

              As a compromise that would retain some generality (that is, not require me
              to check what the parent element is in each case), would this work:

              body>* div.isIE

              ? I think this would then ignore elements that *are* directly children of
              the body, but I'm not applying this technique to any of them. If I were then
              I could add have both selectors:

              body>div.isIE
              body>* div.isIE

              Comment

              • Harlan Messinger

                #8
                Re: IE 5.5, 6 only OR everything BUT those


                "Stephen Poley" <sbpoleySpicedH amTrap@xs4all.n l> wrote in message
                news:7ate10tvcl kj5lc0dp3j258hr ruj4fr1a3@4ax.c om...[color=blue]
                > On Mon, 26 Jan 2004 22:45:25 -0500, Harlan Messinger
                > <hmessinger.rem ovethis@comcast .net> wrote:
                >[color=green]
                > >I would like to use this single page on all browsers. On IE, I'd like
                > >the div to appear and the textarea to be hidden, and vice versa on
                > >other browsers. Suppose I assign the textarea to a class called "ifIE"
                > >and the div to a class called "ifNotIE". What kind of kludge will
                > >result in
                > >
                > > .ifIE { display: block; }
                > > .ifNotIE {display: none; }
                > >
                > >in IE and
                > >
                > > .ifIE { display: none; }
                > > .ifNotIE {display: block; }
                > >
                > >elsewhere?[/color]
                >
                > Never used them myself, but there's a beast called IE conditional
                > comments which should help. Googling c.i.w.a.* should produce the
                > syntax.[/color]

                Thanks, I'll take a look.

                Comment

                • Anne van Kesteren

                  #9
                  Re: IE 5.5, 6 only OR everything BUT those

                  Harlan Messinger wrote:
                  [color=blue]
                  > Fortunately, this application is entirely within my
                  > control, and there are only about half a dozen users![/color]

                  Require them to upgrade to IE6 ;-)
                  [color=blue]
                  >
                  > As a compromise that would retain some generality (that is, not require me
                  > to check what the parent element is in each case), would this work:[/color]

                  Check for yourself: <http://www.skyzyx.com/archives/000094.php>




                  --
                  Anne van Kesteren
                  <http://www.annevankest eren.nl/>

                  Comment

                  • Harlan Messinger

                    #10
                    Re: IE 5.5, 6 only OR everything BUT those

                    Anne van Kesteren <mail@annevanke steren.nl> wrote:
                    [color=blue]
                    >Harlan Messinger wrote:
                    >[color=green]
                    >> Fortunately, this application is entirely within my
                    >> control, and there are only about half a dozen users![/color]
                    >
                    >Require them to upgrade to IE6 ;-)
                    >[color=green]
                    >>
                    >> As a compromise that would retain some generality (that is, not require me
                    >> to check what the parent element is in each case), would this work:[/color]
                    >
                    >Check for yourself: <http://www.skyzyx.com/archives/000094.php>[/color]

                    Wow, that's really taking a chance, isn't it? Now, if I had an
                    expendable machine ....

                    --
                    Harlan Messinger
                    Remove the first dot from my e-mail address.
                    Veuillez ôter le premier point de mon adresse de courriel.

                    Comment

                    • Stephen Poley

                      #11
                      Re: IE 5.5, 6 only OR everything BUT those

                      On Thu, 29 Jan 2004 22:54:36 -0500, Harlan Messinger
                      <hmessinger.rem ovethis@comcast .net> wrote:
                      [color=blue]
                      >Anne van Kesteren <mail@annevanke steren.nl> wrote:
                      >[color=green]
                      >>Harlan Messinger wrote:
                      >>[color=darkred]
                      >>> Fortunately, this application is entirely within my
                      >>> control, and there are only about half a dozen users![/color]
                      >>
                      >>Require them to upgrade to IE6 ;-)
                      >>[color=darkred]
                      >>>
                      >>> As a compromise that would retain some generality (that is, not require me
                      >>> to check what the parent element is in each case), would this work:[/color]
                      >>
                      >>Check for yourself: <http://www.skyzyx.com/archives/000094.php>[/color]
                      >
                      >Wow, that's really taking a chance, isn't it? Now, if I had an
                      >expendable machine ....[/color]

                      It's been on my list of things to try for a few weeks. Has anyone else
                      here tried it?

                      --
                      Stephen Poley


                      Comment

                      • Anne van Kesteren

                        #12
                        Re: IE 5.5, 6 only OR everything BUT those

                        Stephen Poley wrote:[color=blue][color=green][color=darkred]
                        >>>Check for yourself: <http://www.skyzyx.com/archives/000094.php>[/color][/color]
                        >
                        > It's been on my list of things to try for a few weeks. Has anyone else
                        > here tried it?
                        >[/color]

                        Works like a charm (XP).

                        --
                        Anne van Kesteren
                        <http://www.annevankest eren.nl/>

                        Comment

                        • Neal

                          #13
                          Re: IE 5.5, 6 only OR everything BUT those

                          On Fri, 30 Jan 2004 12:50:19 +0100, Stephen Poley
                          <sbpoleySpicedH amTrap@xs4all.n l> wrote:
                          [color=blue][color=green][color=darkred]
                          >>> Check for yourself: <http://www.skyzyx.com/archives/000094.php>[/color]
                          >>
                          >> Wow, that's really taking a chance, isn't it? Now, if I had an
                          >> expendable machine ....[/color]
                          >
                          > It's been on my list of things to try for a few weeks. Has anyone else
                          > here tried it?
                          >[/color]

                          I can have all 3 running simultaneously on W97. The only drawback is they
                          all 'appear' to be IE6 but the behavior is appropriate to the actual
                          versions they are. So you need to keep track of which one is which when
                          you have more than one version open.

                          Comment

                          • Harlan Messinger

                            #14
                            Re: IE 5.5, 6 only OR everything BUT those


                            "Anne van Kesteren" <mail@annevanke steren.nl> wrote in message
                            news:bvdplf$8q1 $1@reader11.wxs .nl...[color=blue]
                            > Stephen Poley wrote:[color=green][color=darkred]
                            > >>>Check for yourself: <http://www.skyzyx.com/archives/000094.php>[/color]
                            > >
                            > > It's been on my list of things to try for a few weeks. Has anyone else
                            > > here tried it?
                            > >[/color]
                            >
                            > Works like a charm (XP).[/color]

                            Besides safety, I'm concerned about reliability. Are you certain that the
                            behavior you're seeing in each "version" is identical to the behavior that
                            that version exhibits when installed by itself?

                            Comment

                            • Neal

                              #15
                              Re: IE 5.5, 6 only OR everything BUT those

                              On Fri, 30 Jan 2004 10:12:43 -0500, Harlan Messinger
                              <h.messinger@co mcast.net> wrote:
                              [color=blue]
                              >
                              > "Anne van Kesteren" <mail@annevanke steren.nl> wrote in message
                              > news:bvdplf$8q1 $1@reader11.wxs .nl...[color=green]
                              >> Stephen Poley wrote:[color=darkred]
                              >> >>>Check for yourself: <http://www.skyzyx.com/archives/000094.php>
                              >> >
                              >> > It's been on my list of things to try for a few weeks. Has anyone else
                              >> > here tried it?
                              >> >[/color]
                              >>
                              >> Works like a charm (XP).[/color]
                              >
                              > Besides safety, I'm concerned about reliability. Are you certain that the
                              > behavior you're seeing in each "version" is identical to the behavior
                              > that
                              > that version exhibits when installed by itself?
                              >[/color]


                              This is more technical than I can explain adequately, but the only parts
                              removed from the installation are things which prevent side-by-side
                              installation. The only real issue I know of is that I'm told attempting to
                              access Favorites will crash it.

                              Comment

                              Working...