Results 1 to 11 of 11
  1. #1
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Browser compatability

    Yes, that old chestnut again. I'm developing a new look for our work website from scratch. While developing it, I kept testing it in Firefox and it's fine. In IE7 I had a minor bug which I've now resolved, so it's fine in Firefox and IE7. But in Opera the scrollbar on the content layer doesn't appear, and when trying to load the thing in IE6 the browser just hangs and nothing happens at all!

    Before I head back to the drawing board and start again from scratch, does anyone have any bright ideas? Full code attached.

    (PS. I know some of the images are a bit ropey but that's the least of my concerns right now!)
    Attached Files Attached Files
    Waggers
    If at first you do succeed, you've probably missed something.

  2. #2
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Browser compatability

    Hi Waggers

    Doing my usual and juggling Woody's with work <img src=/S/grin.gif border=0 alt=grin width=15 height=15>

    I have managed to find the reason for the hang and that is this spurious piece of code in the css file


    height:expression(document.body.clientHeight > 600? "600px": "auto" );

    Which looks very much like a bit of javascript. Now that gets rid of the IE6 hang, we just have to get the layer showing. If I remove this line it still shows in FF2. I'll have a look around for an IE6 hack which is definitely needed for this action
    Jerry

  3. #3
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Browser compatability

    Sorry, just while I am thinking about it.

    Remove the code I suggested above and then change the top code to this:

    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <head>
    <title>clientHeight</title>
    <style type="text/css">
    body {margin: 0; padding: 0;}
    </style>
    <body onload="alert(document.body.clientHeight);"></body>
    <link href="stylesheet.css" rel="stylesheet" type="text/css" />
    </head>

    When I run it in FF2 , It states 600 and in IE6 it states 694 as the client height and it is here where the stumble happens as there is a fumble on the height value...I am now going to potter off and think of a way to get around it <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Jerry

  4. #4
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Browser compatability

    If it helps, IE7 also says 600 (not 694).
    Opera says 599.
    Waggers
    If at first you do succeed, you&#39;ve probably missed something.

  5. #5
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Browser compatability

    Ok, I've read that IE6 has a problem with transparent areas in PNG images, so I converted the PNG to a GIF and now can see the content layer in IE6. The problem is that still in both IE6 and Opera the scrollbar doesn't appear. <img src=/S/sad.gif border=0 alt=sad width=15 height=15>
    Waggers
    If at first you do succeed, you&#39;ve probably missed something.

  6. #6
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Browser compatability

    Hi Waggers

    I have had a play, it is probably best to compare our respective css files as I can see the scroll bar in IE6 sp2 and in Firefox 2.

    I have created gif from the png file and all is well. I replaced your text to get it to pan out a little to see the scrollbar extend down
    Jerry

  7. #7
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Browser compatability

    Thanks Jezza, that's awesome. For some reason I'd taken the height attribute out of content, so there's no wonder mine wasn't working right. Unfortunately the scrollbar still doesn't appear in Opera, but if IE6, IE7 and FF2 all cope then I'm happy for the time being.

    <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15> <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15> <img src=/S/thankyou.gif border=0 alt=thankyou width=40 height=15>
    Waggers
    If at first you do succeed, you&#39;ve probably missed something.

  8. #8
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Browser compatability

    No problems I already have plans to plagiarise it <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>

    Good concept <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>
    Jerry

  9. #9
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Browser compatability

    Cool, if you can make it work in Opera there's a definite [choccy bar] in it for you <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    Waggers
    If at first you do succeed, you&#39;ve probably missed something.

  10. #10
    Platinum Lounger
    Join Date
    Feb 2002
    Location
    A Magic Forest in Deepest, Darkest Kent
    Posts
    5,681
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Browser compatability

    Hi Waggers

    I do not have Opera loaded but I am going to clutch at straws here and try the following hack that is compliant in CSS2.1

    .content {
    font-family: Calibri, Arial;
    color: #0;
    float:right;
    width:600px;
    position:relative;
    z-index: 1;
    overflow-y: scroll;
    max-height: 600px;
    _height:600px;

    }

    Add an underscore(_) to the front of height:600px;. max-height is recognised my Opera and Mozilla but not is ignored by all browsers except IE. So far it appears to do the job with IE6 and FF2, not sure about IE7 and Opera. Here is hoping I get that [choccy bar] <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Jerry

  11. #11
    5 Star Lounger
    Join Date
    Apr 2003
    Location
    Hampshire, United Kingdom
    Posts
    602
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Browser compatability

    No change I'm afraid. Still works fine in IE7 by the way, but not Opera. Have a choccy bar anyway though for trying <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    Waggers
    If at first you do succeed, you&#39;ve probably missed something.

Posting Permissions

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