Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > Browser doesn't display scroll bars

Reply
Thread Tools

Browser doesn't display scroll bars

 
 
Dilip
Guest
Posts: n/a
 
      07-05-2005

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!

 
Reply With Quote
 
 
 
 
David Dorward
Guest
Posts: n/a
 
      07-05-2005
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
 
Reply With Quote
 
 
 
 
Dilip
Guest
Posts: n/a
 
      07-05-2005

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!

 
Reply With Quote
 
Dilip
Guest
Posts: n/a
 
      07-05-2005
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.

 
Reply With Quote
 
David Dorward
Guest
Posts: n/a
 
      07-05-2005
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
 
Reply With Quote
 
Dilip
Guest
Posts: n/a
 
      07-05-2005
Awesome David!
You rock!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to display scroll bars in TreeView in VS 2005 ? luqman ASP .Net 0 04-27-2007 05:42 AM
Can't get textbox to display scroll bars active ASP .Net Web Controls 4 04-07-2007 08:03 PM
Using a div with scroll bars - can we get the scroll bars on the left instead of the right side? UJ ASP .Net 1 11-01-2006 09:32 PM
Menu Control-expanding child items cause browser scroll bars to ap =?Utf-8?B?am9qb2Jhcg==?= ASP .Net 0 07-13-2006 06:05 PM
Can't get FrameSets to Display Scroll Bars JCO Javascript 0 03-01-2004 08:36 PM



Advertisments