Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scrolling window

Status
Not open for further replies.

jdmartin74

Programmer
Sep 13, 2002
45
0
0
US
I have the style below to create a narrow 'bar' across the top of my page. This works fine, however, when I have a window that scrolls to the right, the 'bar' does not draw in the scrolled area. i.e. there is white space from the edge of the original window area to the far right of the page.

Does anyone know of a way of preventing this?

Thanks. Jonathan.

Code:
#top_bar
{
	border-right:0px;
	border-bottom:0px;
	border-left:0px;
	background:#6A0098;
	height:14px;
	padding-top:2px;
	padding-left:0px;
	padding-right:0px;
	padding-bottom:4px;
}
 
Jonathan,

Try adding this:

Code:
BODY {
        margin : 0px;
}

Good Luck


Jakob
 
No, sorry, does the same thing. I should have also probably said I am using IE6 on XP.
 
I tried this on XP/IE6:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/loose.dtd">[/URL]
<HTML>
<HEAD>
  <TITLE>SCROLLING</TITLE>
  <STYLE>
    #top_bar {
        border-right:0px;
        border-bottom:0px;
        border-left:0px;
        background:#6A0098;
        height:14px;
        padding-top:2px;
        padding-left:0px;
        padding-right:0px;
        padding-bottom:4px;
    }
  </STYLE>
</HEAD>

<BODY>

<DIV ID="top_bar"></DIV>

Something ... Something ... Something ... Something ... Something ... Something ... Something ... Something ... 

</BODY>
</HTML>

... and the space from both top cornors remain the same when I resize the window.

Perhaps you've got some conflicting styles?

Regards


Jakob
 
To illustrate my problem, with the code above, use the following for the 'something' line:
Code:
<nobr>Something ... Something ... Something ... Something ... Something ... Something ... Something ... Something ... </nobr>

Make a small window so that it doesn't all fit in, and then refresh. You should now have a horizontal scroll bar. Scroll right, and the purple bar is not drawn all the way across the top.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top