tags:

views:

67

answers:

4

Hi,

Can anyone pls provide some reasons as to why my iframe that displays a report within it, shows a horizontal scrollbar even though the width of the report within it seems to be smaller than the width of the iframe?

There seems to like a small gap that causes the horizontal scrollbar to appear.

Another thing I've noticed is that when the vertical scrollbar appears, the horizontal scrollbar also appears.

For a report that doesn't need the vertical scrollbar, the horizontal scrollbar does not appear either.

Any ideas/help would be appreciate. Unfortunately I am unable to show you an example.

It is the scrollbars within the iFrame not the browser.

Thanks.

A: 

Is it a scroll bar for the frame or for the browser? you could try scaling the iFrame down...

<iframe style="width:99%"></iframe>

Just to make sure that the frame fits in the window.

Shaded
+1  A: 

I am assuming the scroll bar appears within the IFRAME.

This is usually a question of padding, margin, or borders. Maybe a 100% wide element that has a border. Any more detailed info is hard to give without some code. You could install the IE developer toolbar and try highlighting the varous page elements in search for the one that causes it.

Pekka
A: 

I remember reading somehwere (and having trouble with) that IE6 in some cases doubles margins, so try making the IFRAME some extra pixels wider than the report.

If this should be the case, you can always insert IE6 (and earlier) specific CSS code by prefixing the CSS class name in the CSS file with

  * html

So:

  * html .SomeClassName { ... }

for IE6 and earlier and

  .SomeClassName { ...}

for the rest of the browsers (these will ignore the * html ... CSS definitions.

Edelcom
A: 

Does scrolling="no" not help?

DK