Results 1 to 5 of 5

Thread: Mozilla Scrollbar problem

  1. #1
    Join Date
    Dec 2005
    Posts
    133
    Thanks
    23
    Thanked 0 Times in 0 Posts

    Default Mozilla Scrollbar problem

    I want my page in mozilla to have a scroll bar even if the content is very little.
    if I add in the body
    <body leftmargin="0" topmargin="0" style="OVERFLOW-y: scroll;">
    then it shows the scroll in Mozilla as I want it but in IE it will show 2 scrolls.

    see image for example

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    This will work in the more recent Mozilla based browsers like FF 1.5.0.6:

    Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/1999/REC-html401-19991224/loose.dtd">
    <html>
    <head>
    <title></title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <style type="text/css">
    html {
    overflow-y:scroll;
    }
    </style>
    </head>
    <body>
    
    </body>
    </html>
    For older versions use:

    Code:
    <style type="text/css">
    html {
    height:101%;
    }
    * html {
    height:auto;
    }
    </style>
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Can you use them both together? Still not up on CSS myself.

    Using both together seems to capture all versions, yes? Or am I off in that line of thinking?
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The one for the older versions is simply because overflow-y used to be IE only. The older version will produce a page slightly larger than the window, so there will be a scroll bar but it will have a small amount of 'travel' in it. Combining them will not eliminate this in the newer versions. So, to get old and new, just use the old one. The advantage to the new is that there will be no 'travel' in the scroll bar unless the content exceeds the window height, just like in IE.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Aug 2005
    Location
    Other Side of My Monitor
    Posts
    3,494
    Thanks
    5
    Thanked 105 Times in 104 Posts
    Blog Entries
    1

    Default

    Ah! Makes sense. Thanks John.
    {CWoT - Riddle } {Freelance Copywriter} {Learn to Write}
    Follow Me on Twitter: @InkingHubris
    PHP Code:
    $result mysql_query("SELECT finger FROM hand WHERE id=3");
    echo 
    $result

Bookmarks

Posting Permissions

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