www.webdeveloper.com
Results 1 to 3 of 3

Thread: Why can't I scroll when the browser is minimzed?

  1. #1
    Join Date
    Jan 2013
    Posts
    2

    Why can't I scroll when the browser is minimzed?

    Hey everyone,

    I am having a basic problem here. Just to check and see what would happen if the page was too big for the browser, I made a div within the body, a paragraph in the div, and made the div and body 10,000 px wide.

    The problem is that a scrollbar does not appear at the bottom of the browser when this happens.

    If I set overflow to scroll for the div, it works for the div, but I want the scroll bar to be at the bottom of the page (scroll the whole body).

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css" />
    #header {
    font-family: Verdana, Geneva, sans-serif;
    font-size: 24px;
    font-style: italic;
    font-weight: bold;
    background-color: #06F;
    text-align: left;
    color: #FF6;
    height: 110px;
    width: 10000px;
    padding-top: 0px;
    padding-right: 0px;
    padding-bottom: 0px;
    padding-left: 0px;
    margin-top: 0px;
    margin-right: 0px;
    margin-bottom: 0px;
    margin-left: 0px;
    overflow: hidden;
    position: fixed;
    line-height: 0px;
    }

    body {
    padding:0;
    overflow: scroll;
    margin: 0;
    width: 10000px;
    }
    </style>
    </head>

    <body>
    <div id="header">
    <h1>Dan's Website</h1>
    <p>Under Construction .................................................................................................... ..................................................................................................</p>
    </div>
    </body>
    </html>

  2. #2
    Join Date
    Sep 2008
    Location
    Akron, OH
    Posts
    1,123
    Fixed position won't affect the scrollbars. Remove the "position: fixed;" and you should be all set.
    I'm always up for networking with fellow web professionals. Connect with me on LinkedIn if you like!

  3. #3
    Join Date
    Jan 2013
    Posts
    2
    Thanks. That works. I knew it would be an easy fix.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles