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

How can I remove the left-right scroll bar?

Status
Not open for further replies.

nminaker

Technical User
Jun 17, 2004
19
I have an iframe centered on a page and a navigation frame at the above it. The navigation frame uses the iframe as the target and seems to "think" that everything loaded into it is too wide and needs a scroll bar. However, I can see the whole page(left to right) fine. The only scroll bar I really need is the one on the right that scrolls up and down.

Is there anyway to remove the bottom(left-right) scroll bar?

Nick
 
How about making it slightly wider (maybe +1 to whatever you have)?

--Chessbot

"See the TURTLE of enormous girth!"
-- Stephen King, The Dark Tower series
 
I tried making it 100px wider... same problem. :(
 
if the target page is one you have also writen try
<body style="overflow:auto;">
in that page. Should kill any unneccasery scroll bars
 
And if that doesn't work, I would place the iframe inside a div, and then size the div.

For example:

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>new document</title>

<style type="text/css">

#main {
	height: 150px;
	overflow: hidden;
}

#if {
	height: 165px;
}

</style>

</head>

<body>

Here's the iframe!
<div id="main">
    <iframe id="if" src="Noname1.html"></iframe>
</div>

</body>

</html>

*cLFlaVA
----------------------------
Lois: "Peter, you're drunk!"
Peter: "I'm not drunk, I'm just exhausted from stayin' up all night drinking!
 
Another issue that I'm aware of with this is that on some browsers and platforms (IE/Mac comes to mind), setting the "width" property of anything on the page to more than 95% of page width will generate a horizontal scroll bar regardless of its actual width relative to the page and screen.

Just a thought... seeing as I don't know what your hardware platform is, but if you're using iframes I'm assuming you're using IE...

JavaStripped
&quot;I did *not* escape. They gave me a day pass.&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top