Crossing Browser

Discussion in 'HTML' started by Cricca, Jan 15, 2012.

  1. Cricca

    Cricca Guest

    I want use the "Crossing Browser" technical for create a website for solve
    some different behavior between the browsers.
    I have searched news in internet and I find this page
    http://www.dozarte.com/wordpress/20...-diversi-firefox-internet-explorer-7-e-ie-60/

    For try some experiment I have create a sample page with this code

    <html>
    <head>
    <title>Crissing Browser</title>
    </head>
    <body>
    <!--[if IE]>
    I am Internet Explorer
    <![endif]-->
    <!--[if 'Gecko']>
    I am Mozilla Firefox
    <![endif]-->
    <!--[if Opera]>
    I am Opera
    <![endif]-->
    <!--[if chrome]>
    I am Google Chrome
    <![endif]-->
    <!--[if Webkit]>
    I am Safari
    <![endif]-->
    </body>
    </html>

    If I open the page with Internet Explorer, all is ok, but with the other
    browsers the page open is all blank.

    Where is my errore?
    Someone can help me?

    Tanks
    Cricca
     
    Cricca, Jan 15, 2012
    #1
    1. Advertising

  2. 2012-01-15 11:38, Cricca wrote:

    > I want use the "Crossing Browser" technical for create a website for solve
    > some different behavior between the browsers.


    Stop wanting that. Find out the problems and fix them. And as far as
    it's just a little different rendering, stop seeing it as a problem.

    > <!--[if 'Gecko']>
    > I am Mozilla Firefox
    > <![endif]-->


    How did you make that up? The silly "conditional comments" thing is an
    IE oddity, and you can't extend it to other browsers just by throwing
    their names into it.

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
     
    Jukka K. Korpela, Jan 15, 2012
    #2
    1. Advertising

  3. Cricca

    Gus Richter Guest

    On 1/15/2012 4:38 AM, Cricca wrote:
    > I want use the "Crossing Browser" technical for create a website for solve
    > some different behavior between the browsers.
    > I have searched news in internet and I find this page
    > http://www.dozarte.com/wordpress/20...-diversi-firefox-internet-explorer-7-e-ie-60/
    >
    > For try some experiment I have create a sample page with this code
    >
    > <html>
    > <head>
    > <title>Crissing Browser</title>
    > </head>
    > <body>
    > <!--[if IE]>
    > I am Internet Explorer
    > <![endif]-->
    > <!--[if 'Gecko']>
    > I am Mozilla Firefox
    > <![endif]-->
    > <!--[if Opera]>
    > I am Opera
    > <![endif]-->
    > <!--[if chrome]>
    > I am Google Chrome
    > <![endif]-->
    > <!--[if Webkit]>
    > I am Safari
    > <![endif]-->
    > </body>
    > </html>
    >
    > If I open the page with Internet Explorer, all is ok, but with the other
    > browsers the page open is all blank.
    >
    > Where is my errore?
    > Someone can help me?



    You are confusing the two subjects that the web site is talking about -
    "Conditional Comments" and "Conditional CSS".

    "Conditional Comments" (HTML markup) are ignored by all browsers and can
    be seen only in the source. The difference is that *only* IE does
    something with <!-- [if ... to present something to the different IE
    versions.

    "Conditional CSS" is software to assist in providing visitors to your
    web site with a stylesheet dependant on the browser that the visitor is
    using (IE or any other). The Conditional Comments idea is used and
    expanded to include all other browsers and not only IE, for Stylesheet
    Rules. One stylesheet on the server containing Conditional Rules for
    various browsers and the server sends only the ones needed for the
    visiting browser.

    You are trying to use the Conditional CSS Rules (called Statements on
    their website) intended for Stylesheets as HTML Comments. <!--[if IE]>
    is the same in both (for HTML Markup and Conditional CSS), therefore it
    works in IE for you. All others are meaningless for IE and are ignored.
    All, including the <!--[if IE]> are ignored by all other browsers.

    --
    Gus
     
    Gus Richter, Jan 15, 2012
    #3
  4. Cricca

    dorayme Guest

    In article <jeu6q6$2d0$>, "Cricca" <>
    wrote:

    > For try some experiment I have create a sample page with this code
    >
    > <html>
    > <head>
    > <title>Crissing Browser</title>
    > </head>
    > <body>
    > <!--[if IE]>
    > I am Internet Explorer
    > <![endif]-->
    > <!--[if 'Gecko']>
    > I am Mozilla Firefox
    > <![endif]-->
    > <!--[if Opera]>
    > I am Opera
    > <![endif]-->
    > <!--[if chrome...

    ....
    >
    > If I open the page with Internet Explorer, all is ok, but with the other
    > browsers the page open is all blank.
    >
    > Where is my errore?
    > Someone can help me?
    >


    One of the nicest mistakes I have seen for a while! Yes, it might seem
    that you can talk to various browsers this way. Unfortunately, (or
    maybe not really), the conditional construction in the comments are
    just for Internet Explorer. There have been various ways and hacks
    that people have engineered or discovered to say things to various
    non-IE browsers but there are much more important and robust other
    things to remember than this.

    Some differences are due to different browsers having different
    default styles, you can be rid of these by attending to your CSS
    sheet. Other differences can occur because your pages render in some
    quirk mode (as can happen when there is no doctype declaration).

    Most of the serious differences that are worth worrying about are
    usually between, on the one hand all the modernish browsers except IE
    on the one hand, and IE on the other. In other words, the conditional
    that does work happens to be the one that even good webpage makers
    find useful, the others that you are imagining would not be all that
    useful.

    --
    dorayme
     
    dorayme, Jan 15, 2012
    #4
  5. Cricca

    Gus Richter Guest

    On 1/15/2012 7:40 AM, dorayme wrote:
    > .... others that you are imagining ....



    He's not imagining them. Just using them in the wrong place.

    He read about them, as he said, on this Italian web site:
    <http://www.dozarte.com/wordpress/2011/02/24/css-diversi-per-browser-diversi-firefox-internet-explorer-7-e-ie-60/>
    which in turn wrote about this web site:
    <http://www.conditional-css.com/>

    Perhaps my response to the OPs question now makes more sense? I was not
    expressing an opinion on the software required to make this Conditional
    CSS work, which he may or may not be using, at least not properly,
    obviously.

    --
    Ciao,
    Gus
     
    Gus Richter, Jan 15, 2012
    #5
  6. Cricca

    dorayme Guest

    In article <jeumac$cqb$>,
    Gus Richter <> wrote:

    > On 1/15/2012 7:40 AM, dorayme wrote:
    > > .... others that you are imagining ....

    >
    >
    > He's not imagining them. Just using them in the wrong place.
    >


    Fair enough, I don't recall seeing your good post when I wrote that.
    Is it browser sniffing at work along with other things?

    > He read about them, as he said, ...
    > which in turn wrote about this web site:
    > <http://www.conditional-css.com/>
    >
    > Perhaps my response to the OPs question now makes more sense? I was not
    > expressing an opinion on the software required to make this Conditional
    > CSS work, which he may or may not be using, at least not properly,
    > obviously.


    Fair enough again.

    ------------

    btw, I am reminded:

    Years ago, I either just tested or actually used this way for WinIE's
    eyes only, *but not MacIE* (there was a MacIE back then):

    /* Hide from IE5-mac. Only IE-win sees this. \*/

    * html leftPicAndCaption {
    margin-right: 10px;

    * html ul {
    height: 1%;
    margin-left: 0;
    }

    /* End hide from IE5/mac */

    --
    dorayme
     
    dorayme, Jan 15, 2012
    #6
  7. Cricca

    Gus Richter Guest

    On 1/15/2012 5:00 PM, dorayme wrote:
    > Is it browser sniffing at work along with other things?



    I imagine so. I have never used the product.

    --
    Gus
     
    Gus Richter, Jan 16, 2012
    #7
  8. Cricca

    dorayme Guest

    In article <jf006s$392$>,
    Gus Richter <> wrote:

    > On 1/15/2012 5:00 PM, dorayme wrote:
    > > Is it browser sniffing at work along with other things?

    >
    >
    > I imagine so. I have never used the product.


    Anyway...

    Talking IE conditionals, I am having trouble today catering to IE6 on
    my Mac running WinXP in VirtualBox. I might just have to launch a new
    site and let it be a bit bad in IE6. Or find a machine that just runs
    Windows and IE6 only to test?

    But first, can anyone confirm that in IE6 the big text in the
    following url is white on black? I have tried it with <!--[if IE6]>
    and <!--[if IE 6]>, not sure that makes a difference?

    <http://dorayme.netweaver.com.au/ie6ConditionalTest.html>

    Perhaps there is a mistake I am not seeing?

    --
    dorayme
     
    dorayme, Jan 16, 2012
    #8
  9. Cricca

    Gus Richter Guest

    On 1/15/2012 10:41 PM, dorayme wrote:
    > But first, can anyone confirm that in IE6 the big text in the
    > following url is white on black? I have tried it with<!--[if IE6]>
    > and<!--[if IE 6]>, not sure that makes a difference?
    >
    > <http://dorayme.netweaver.com.au/ie6ConditionalTest.html>



    My IE6 renders white on black if I use <!--[if IE 6]> only.

    --
    Gus
     
    Gus Richter, Jan 16, 2012
    #9
  10. Cricca

    dorayme Guest

    In article <jf0uer$vrf$>,
    Gus Richter <> wrote:

    > On 1/15/2012 10:41 PM, dorayme wrote:
    > > But first, can anyone confirm that in IE6 the big text in the
    > > following url is white on black? I have tried it with<!--[if IE6]>
    > > and<!--[if IE 6]>, not sure that makes a difference?
    > >
    > > <http://dorayme.netweaver.com.au/ie6ConditionalTest.html>

    >
    >
    > My IE6 renders white on black if I use <!--[if IE 6]> only.


    Not sure what you mean by your "only"?

    In the head, I now have:

    <style type="text/css" media="screen">
    p {color: black; background: white; font-size: 1.3em; width: 25em;}
    </style>

    <!--[if IE 6]>
    <style type="text/css" media="screen">
    p {color: white; background: black; }
    </style>
    <![endif]-->

    If the conditional works, IE6 should be white text on black bg. It is
    not appearing so in my IE6 on VirtualBox nor on screenshots from
    Browsershots?

    If, instead of above, I had:

    <style type="text/css" media="screen">
    p {color: black; background: white; font-size: 1.3em; width: 25em;}
    </style>

    <style type="text/css" media="screen">
    p {color: white; background: black; }
    </style>

    most if not all browsers, including IE6, would show white on black.

    But I may be getting the construction wrong, perhaps I will think more
    clearly tomorrow.

    --
    dorayme
     
    dorayme, Jan 16, 2012
    #10
  11. Cricca

    dorayme Guest

    In article <>,
    dorayme <> wrote:

    > In article <jf0uer$vrf$>,
    > Gus Richter <> wrote:
    >
    > > On 1/15/2012 10:41 PM, dorayme wrote:
    > > > But first, can anyone confirm that in IE6 the big text in the
    > > > following url is white on black? I have tried it with<!--[if IE6]>
    > > > and<!--[if IE 6]>, not sure that makes a difference?
    > > >
    > > > <http://dorayme.netweaver.com.au/ie6ConditionalTest.html>

    > >
    > >
    > > My IE6 renders white on black if I use <!--[if IE 6]> only.


    OK, I am now getting browsershot to show what I expect. But it is
    impossible to rely on this as it takes about half an hour even when
    requesting only IE 6. Maybe I will have to haul out an old PC box and
    put XP and just IE 6 on it, really don't want to!

    --
    dorayme
     
    dorayme, Jan 16, 2012
    #11
  12. Cricca

    Gus Richter Guest

    On 1/16/2012 6:22 AM, dorayme wrote:
    > In article<jf0uer$vrf$>,
    > Gus Richter<> wrote:
    >
    >> On 1/15/2012 10:41 PM, dorayme wrote:
    >>> But first, can anyone confirm that in IE6 the big text in the
    >>> following url is white on black? I have tried it with<!--[if IE6]>
    >>> and<!--[if IE 6]>, not sure that makes a difference?
    >>>
    >>> <http://dorayme.netweaver.com.au/ie6ConditionalTest.html>

    >>
    >>
    >> My IE6 renders white on black if I use<!--[if IE 6]> only.

    >
    > Not sure what you mean by your "only"?


    I only get white on black with <!--[if IE 6]> but not with <!--[if IE6]>

    > In the head, I now have:
    >
    > <style type="text/css" media="screen">
    > p {color: black; background: white; font-size: 1.3em; width: 25em;}
    > </style>
    >
    > <!--[if IE 6]>
    > <style type="text/css" media="screen">
    > p {color: white; background: black; }
    > </style>
    > <![endif]-->


    Same code as in your test case - same result - IE6 renders P element
    white on black.

    > If the conditional works, IE6 should be white text on black bg.


    Exactly so.

    > It is
    > not appearing so in my IE6 on VirtualBox nor on screenshots from
    > Browsershots?


    I guess they don't work as expected? Don't support conditional comments?

    > If, instead of above, I had:
    >
    > <style type="text/css" media="screen">
    > p {color: black; background: white; font-size: 1.3em; width: 25em;}
    > </style>
    >
    > <style type="text/css" media="screen">
    > p {color: white; background: black; }
    > </style>


    Using the both immediately above, although not proper, results in the
    last overwriting. All P elements will be white on black for all browsers.

    > most if not all browsers, including IE6, would show white on black.


    Exactly so.

    --
    Gus
     
    Gus Richter, Jan 16, 2012
    #12
  13. Cricca

    Gus Richter Guest

    On 1/16/2012 7:06 AM, dorayme wrote:
    > OK, I am now getting browsershot to show what I expect. But it is
    > impossible to rely on this as it takes about half an hour even when
    > requesting only IE 6. Maybe I will have to haul out an old PC box and
    > put XP and just IE 6 on it, really don't want to!


    Ya gotta do whatcha gotta do. LOL

    --
    Gus
     
    Gus Richter, Jan 16, 2012
    #13
  14. dorayme <> writes:

    > In article <>,
    > dorayme <> wrote:
    >
    >> In article <jf0uer$vrf$>,
    >> Gus Richter <> wrote:
    >>
    >> > On 1/15/2012 10:41 PM, dorayme wrote:
    >> > > But first, can anyone confirm that in IE6 the big text in the
    >> > > following url is white on black? I have tried it with<!--[if IE6]>
    >> > > and<!--[if IE 6]>, not sure that makes a difference?
    >> > >
    >> > > <http://dorayme.netweaver.com.au/ie6ConditionalTest.html>
    >> >
    >> >
    >> > My IE6 renders white on black if I use <!--[if IE 6]> only.

    >
    > OK, I am now getting browsershot to show what I expect. But it is
    > impossible to rely on this as it takes about half an hour even when
    > requesting only IE 6. Maybe I will have to haul out an old PC box and
    > put XP and just IE 6 on it, really don't want to!


    For what it's worth, my Linux-hosted VirtualBox XP machine shows what
    you'd expect (white text on black) using IE6.

    --
    Ben.
     
    Ben Bacarisse, Jan 16, 2012
    #14
  15. Cricca

    Neil Gould Guest

    dorayme wrote:
    > In article <jf006s$392$>,
    > Gus Richter <> wrote:
    >
    >> On 1/15/2012 5:00 PM, dorayme wrote:
    >>> Is it browser sniffing at work along with other things?

    >>
    >>
    >> I imagine so. I have never used the product.

    >
    > Anyway...
    >
    > Talking IE conditionals, I am having trouble today catering to IE6 on
    > my Mac running WinXP in VirtualBox. I might just have to launch a new
    > site and let it be a bit bad in IE6. Or find a machine that just runs
    > Windows and IE6 only to test?
    >
    > But first, can anyone confirm that in IE6 the big text in the
    > following url is white on black? I have tried it with <!--[if IE6]>
    > and <!--[if IE 6]>, not sure that makes a difference?
    >
    > <http://dorayme.netweaver.com.au/ie6ConditionalTest.html>
    >
    > Perhaps there is a mistake I am not seeing?
    >

    Using "<!--[if IE 6]>" works as you expect with IE6, and is the syntax that
    I've used for years to differentiate between IE versions.

    --
    Neil
     
    Neil Gould, Jan 16, 2012
    #15
  16. Cricca

    dorayme Guest

    In article
    <>,
    Ben Bacarisse <> wrote:
    ....
    > >> > On 1/15/2012 10:41 PM, dorayme wrote:
    > >> > > ... can anyone confirm that in IE6 the big text in the
    > >> > > following url is white on black? ...
    > >> > >
    > >> > > <http://dorayme.netweaver.com.au/ie6ConditionalTest.html>
    > >> >

    ....
    >
    > For what it's worth, my Linux-hosted VirtualBox XP machine shows what
    > you'd expect (white text on black) using IE6.


    At the moment, it might be worth a beer just for friendly effort, but
    if you want a chance at winning a round-the-world trip, 5-star
    accommodation, first-class air travel for you *and* your family, you
    need to tell me more.

    I have no doubt that IE6 can and should see what you are seeing and
    even on VirtualBox. The question is quite how. My XP installation came
    with either IE8 if I remember and I installed it and later got hold of
    something called MultipleIEs

    My IE6 is showing, under Properties

    "C:\Program Files\MultipleIEs\IE6\iexplore.exe"

    Which has been useful but I better look into other ways of emulating
    or running IE6 to get over this IE conditional problem I am having?

    IE8 in compatibility view to get an idea of IE7 is good enough for
    most of my purposes.

    There is a page at

    <http://www.quirksmode.org/css/condcom.html>

    which has a note that says:

    Note however, that if you use multiple Explorers on one computer, the
    conditional comments will render as if all these Explorer versions are
    the highest Explorer version available on your machine (usually
    Explorer 6.0).

    The last reference to 6.0 might be a typo? Or it might not be a
    reference to IE but some other Win program, Windows Explorer?

    --
    dorayme
     
    dorayme, Jan 16, 2012
    #16
  17. Cricca

    dorayme Guest

    In article <jf1iqe$q0$>,
    "Neil Gould" <> wrote:

    > Using "<!--[if IE 6]>" works as you expect with IE6, and is the syntax that
    > I've used for years to differentiate between IE versions.


    Yes, thanks, me too. It is just a problem lately in my VirtualBox
    installation it seems.

    --
    dorayme
     
    dorayme, Jan 16, 2012
    #17
  18. Cricca

    Neil Gould Guest

    dorayme wrote:
    > In article <jf1iqe$q0$>,
    > "Neil Gould" <> wrote:
    >
    >> Using "<!--[if IE 6]>" works as you expect with IE6, and is the
    >> syntax that I've used for years to differentiate between IE versions.

    >
    > Yes, thanks, me too. It is just a problem lately in my VirtualBox
    > installation it seems.
    >

    I checked it out on an older PC, running gen-you-wine IE6, so I know that
    result is valid. If VirtualBox differs, it's pretty much wrong.

    --
    Neil
     
    Neil Gould, Jan 16, 2012
    #18
  19. dorayme <> writes:

    > In article
    > <>,
    > Ben Bacarisse <> wrote:
    > ...
    >> >> > On 1/15/2012 10:41 PM, dorayme wrote:
    >> >> > > ... can anyone confirm that in IE6 the big text in the
    >> >> > > following url is white on black? ...
    >> >> > >
    >> >> > > <http://dorayme.netweaver.com.au/ie6ConditionalTest.html>
    >> >> >

    > ...
    >>
    >> For what it's worth, my Linux-hosted VirtualBox XP machine shows what
    >> you'd expect (white text on black) using IE6.

    >
    > At the moment, it might be worth a beer just for friendly effort, but
    > if you want a chance at winning a round-the-world trip, 5-star
    > accommodation, first-class air travel for you *and* your family, you
    > need to tell me more.


    I don't think I can...

    > I have no doubt that IE6 can and should see what you are seeing and
    > even on VirtualBox. The question is quite how. My XP installation came
    > with either IE8 if I remember and I installed it and later got hold of
    > something called MultipleIEs
    >
    > My IE6 is showing, under Properties
    >
    > "C:\Program Files\MultipleIEs\IE6\iexplore.exe"
    >
    > Which has been useful but I better look into other ways of emulating
    > or running IE6 to get over this IE conditional problem I am having?


    My IE6 is in a virtual machine provided by Microsoft for compatibility
    testing. I think these machines are still available, but it was a pain
    to get it to work in VirtualBox.

    > IE8 in compatibility view to get an idea of IE7 is good enough for
    > most of my purposes.
    >
    > There is a page at
    >
    > <http://www.quirksmode.org/css/condcom.html>
    >
    > which has a note that says:
    >
    > Note however, that if you use multiple Explorers on one computer, the
    > conditional comments will render as if all these Explorer versions are
    > the highest Explorer version available on your machine (usually
    > Explorer 6.0).
    >
    > The last reference to 6.0 might be a typo? Or it might not be a
    > reference to IE but some other Win program, Windows Explorer?


    I'd guess a typo. Elsewhere on the page the same text excludes that
    final reference, and the translations of the page (those that I can
    read, at least) have all changed that text. That certainly looks like
    the explanation.

    --
    Ben.
     
    Ben Bacarisse, Jan 16, 2012
    #19
  20. Cricca

    dorayme Guest

    In article
    <>,
    Ben Bacarisse <> wrote:

    > My IE6 is in a virtual machine provided by Microsoft for compatibility
    > testing. I think these machines are still available, but it was a pain
    > to get it to work in VirtualBox.


    Yes, I read about this but noticed it could be a pain to install on
    VirtualBox on a Mac. Will think about it.

    --
    dorayme
     
    dorayme, Jan 16, 2012
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad
    Replies:
    0
    Views:
    531
    tshad
    Feb 21, 2005
  2. Jeff Thies

    content crossing frames

    Jeff Thies, Oct 16, 2004, in forum: HTML
    Replies:
    9
    Views:
    865
  3. Mark
    Replies:
    0
    Views:
    411
  4. Replies:
    1
    Views:
    281
    Matthew Crisanti
    Aug 4, 2007
  5. kpram
    Replies:
    0
    Views:
    984
    kpram
    Nov 15, 2007
Loading...

Share This Page