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

iframe horizontale scroll-bar problems

Status
Not open for further replies.

123456programmer

Programmer
Aug 3, 2003
105
AU
I want to get rid of the horizontale scroll-bar :(

I have this on main.php
<TD COLSPAN=6 width="506" height="365">
<IFRAME frameborder="0" src="news.php" width="500" height="365" scrolling="yes"></IFRAME>
</TD>

And the news.php is a table that is 470 wide...
which means that the horizontale scroll-bar shouldn't appear, but it does !! :(
I'm using IE6+
Thanks In advance.
 

I haven't tried this, but it's worth a crack:

Code:
<iframe frameborder="0" src="news.php" width="500" height="365" scrolling="yes" style="overflow-x:hidden;"></iframe>

I'm not sure how many browsers support it, but I'm pretty sure IE5.5 and IE6 do, anyway.

Hope this helps,
Dan
 
The news.php probably has padding in the "body" (by browser default). Try adding a style sheet to your news.php with the following:
Code:
Through CSS (preferred/recommended)
body {
	margin:0px;
}
OR
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

Internet Explorer adds about 10px to the top and bottom by default (not sure about NS - probably something similar).

The marginwidth and marginheight settings are for Netscape (they decided to choose different naming conventions).[thumbsup2]

Pete.


Web Developer & Aptrix / IBM Lotus Workplace Web Content Management (LWWCM) Specialist
w: e: Pete.Raleigh(at)lclimited.co.uk
 
both won't work.
In news.php I changed the width to 100% then everything worked.
thank you guys for your time, and yor help :D
 
> both won't work.
Hmmm. I created a table in an HTML file (called news.php) with a width of 470. Added the "body {margin:0px}" to the HEAD section of the news.php file, and loaded it through your code snippet above. No scrollbars.

What browser/version are you using?

Are you sure you didn't add the CSS codes to the wrong page?

Pete.


Web Developer & Aptrix / IBM Lotus Workplace Web Content Management (LWWCM) Specialist
w: e: Pete.Raleigh(at)lclimited.co.uk
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top