Browser doesn't display scroll bars

D

Dilip

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!
 
D

David Dorward

Dilip said:
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.
 
D

Dilip

David said:
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!
 
D

Dilip

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top