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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Getting two scrollbars

Status
Not open for further replies.

unclerico

IS-IT--Management
Jun 8, 2005
2,738
US
using the following in IE 6:
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "[URL unfurl="true"]http://www.w3.org/TR/html4/strict.dtd">[/URL]
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body {padding-left:220px}
div.fixed {
	position: fixed;
	border: solid 1px silver;
	background-color: whitesmoke;
	width: 150px;
	height: 200px;
	left: 5px;
	top: 60px;
	padding: 5px;
}
</style>
<style type="text/css">
html, body
	{
	height: 100%;
	overflow: auto;
	}
div.fixed {
	position: absolute;
}
</style>
</head>

<body>
<div class="fixed">
	Search By:
	<select name="cboSearch" id="cboSearch">
		<option value="1">1</option>
		<option value="2">2</option>
	</select>&nbsp;
	Search String:
	<input type="text" name="txtSearch" id="txtSearch" maxlength="20" />&nbsp;
	<input type="submit" name="btnSubmit" id="btnSubmit" value="Submit" />
</div>
This code was borrowed from thanks to Vragabond's answer in another topic. Anyways, being VERY new to CSS I do not understand why the above gives me two vertical scrollbars. Can someone enlighten me??
 
thanks for your reply Glen...yep, if I remove the overflow:auto then those scrollbars go away; however, this returns the layout to simple html that when the page scrolls down the menu does not scroll with it. I have no clue why it doesn't work correctly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top