Browser doesn't display scroll bars

Discussion in 'HTML' started by Dilip, Jul 5, 2005.

  1. Dilip

    Dilip Guest

    Hello

    I am newbie to the world of HTML. I have a quick question. I have the
    following HTML snippet:

    <html>
    <head>
    <title>centering submit-buttons</title>
    </head>
    <body>
    <form method="post" action="anywhere">
    <div align="center">
    <input type="submit" name="RefreshBtn" value="Click
    to Refresh" id="RefreshBtn"
    style="height:40px;width:120px;POSITION:
    relative;TOP: 552px; TEXT-ALIGN: CENTER" />
    </div>

    </form>
    </body>
    </html>

    THe button at the desired position but when I reduce the size of the
    browser by dragging the border closer, as soon as the window crosses
    the button, no scroll bar shows up. I have an idea why but i can't
    understand how to solve it. how do I ensure the browser displays a
    scroll bar so that the user can scroll down and then click the submit
    button?

    thanks!
    Dilip, Jul 5, 2005
    #1
    1. Advertising

  2. Dilip wrote:

    > style="height:40px;width:120px;POSITION:
    > relative;TOP: 552px; TEXT-ALIGN: CENTER" />


    > THe button at the desired position but when I reduce the size of the
    > browser by dragging the border closer, as soon as the window crosses
    > the button, no scroll bar shows up.


    A consequence of positioning - you can position stuff right off the screen.
    You are probably better off using a margin.

    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Jul 5, 2005
    #2
    1. Advertising

  3. Dilip

    Dilip Guest

    David Dorward wrote:
    > Dilip wrote:
    >
    > > style="height:40px;width:120px;POSITION:
    > > relative;TOP: 552px; TEXT-ALIGN: CENTER" />

    >
    > > THe button at the desired position but when I reduce the size of the
    > > browser by dragging the border closer, as soon as the window crosses
    > > the button, no scroll bar shows up.

    >
    > A consequence of positioning - you can position stuff right off the screen.
    > You are probably better off using a margin.


    David -- thanks for the response. I am still not clear how to do this.
    I have been programming for years but I have never done any HTML in my
    life -- it would be great if you can give me a short example?

    I want a button positioned somewhere in the bottom of the screen, I
    want it centered and I want the scroll bars showing up if someone
    reduces the window size of the browser. I still cannot accomplish the
    last part!
    Dilip, Jul 5, 2005
    #3
  4. Dilip

    Dilip Guest

    David
    I tried doing it like this:

    <html>
    <head>
    <title>centering submit-buttons</title>
    </head>

    <body>
    <table width="100%" border="5">
    <tr>
    <td align="center">
    <form method="post" action="anywhere">
    <input type="submit" name="RefreshBtn" value="Click
    to Refresh" id="RefreshBtn"
    style="height:40px;width:120px;POSITION:
    absolute;TOP: 552px; TEXT-ALIGN: CENTER" />
    </form>
    </td>
    </tr>
    </table>

    </body>

    </html>

    This works and the scroll bar shows up but the button doesn't look like
    its being centered despite the td align attribute. As you shorten the
    width of the browser window, it appears as if the button moves to the
    right a little bit instead of staying at the center.
    Dilip, Jul 5, 2005
    #4
  5. Dilip wrote:
    > David Dorward wrote:
    >> Dilip wrote:


    >>> style="height:40px;width:120px;POSITION:
    >>> relative;TOP: 552px; TEXT-ALIGN: CENTER" />


    >> You are probably better off using a margin.


    > David -- thanks for the response. I am still not clear how to do this.


    style="margin-top: 120px;"


    --
    David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
    Home is where the ~/.bashrc is
    David Dorward, Jul 5, 2005
    #5
  6. Dilip

    Dilip Guest

    Awesome David!
    You rock!
    Dilip, Jul 5, 2005
    #6
    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. =?Utf-8?B?am9qb2Jhcg==?=
    Replies:
    0
    Views:
    553
    =?Utf-8?B?am9qb2Jhcg==?=
    Jul 13, 2006
  2. UJ
    Replies:
    1
    Views:
    558
    John Timney \(MVP\)
    Nov 1, 2006
  3. luqman
    Replies:
    0
    Views:
    422
    luqman
    Apr 27, 2007
  4. active

    Can't get textbox to display scroll bars

    active, Apr 7, 2007, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    161
    active
    Apr 7, 2007
  5. JCO
    Replies:
    0
    Views:
    104
Loading...

Share This Page