One problem with IE only.

HTML, CSS and anything else that deals with client side capabilities.

Moderator: General Moderators

Post Reply
lovelf
Forum Contributor
Posts: 153
Joined: Wed Nov 05, 2008 12:06 am

One problem with IE only.

Post by lovelf »

Hi, I am displaying a frame inside a table:

Code: Select all

<table style="height:100%; width:100%;"><tr><td>
<iframe frameborder="0" width="100%" height="100%" src="http://www.asite.com/directory/file.php?a=<?php echo $n; ?>&code=codehere">
</td></tr></table>
With PHP I get the value of "n" from the url that has about 15.000+ different values :mrgreen:

Code: Select all

<?php $n=$_GET['n'] ?>
My problem is that in IE the scrollbar shows up twice, seems like the table size does not adapt to the frame size on IE.
On all other browsers, Firefox, Opera, Chrome, Safari, etc, the table adapts to the size of the frame and the scrollbar does not show up for the frame, the actual page that contains the frame gets the height of the frame through the table. With Internet Explorer it does not happen.

I cannot set a height for the table different than "100%" since all files I need to display inside the frame have different heights.

Could someone provide a solution please?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: One problem with IE only.

Post by requinix »

Why use a table in the first place? Get rid of it, it serves no purpose.
lovelf
Forum Contributor
Posts: 153
Joined: Wed Nov 05, 2008 12:06 am

Re: One problem with IE only.

Post by lovelf »

Hi, the purpose of the table is essential. Without it none of the browsers get to display the frame with one scrollbar only.

When I remove the table there is no element containing the frame with a height equal to the frames height, therefore the browser assigns a scrollbar to the frame.

Internet Explorer does not get to match the height of the table with the height of the frame and that is why I see two scrollbars on IE, which is the problem I need to solve.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: One problem with IE only.

Post by requinix »

You give a height of 100% to the table so the table will expand to be as tall as the window. The iframe has a similar height so it will expand to the size of the table = the size of the window minus a bit.
IE gives the window a scrollbar. If the iframe's content is too big then it will get a scrollbar too.

What about that do you want to change? Is the overflow CSS attribute useful here?
lovelf
Forum Contributor
Posts: 153
Joined: Wed Nov 05, 2008 12:06 am

Re: One problem with IE only.

Post by lovelf »

Actually IE does not even give functionality to the main scrollbar, it just sets a scrollbar for the frame and the main browser scrollbar is locked but shown.
I think the table on IE for some reason does not get the size of the iframe automatically with percentages, hope there is a workaround to fix this.
On the other browsers this does not happen. Overflow property did not help.
User avatar
panic!
Forum Regular
Posts: 516
Joined: Mon Jul 31, 2006 7:59 am
Location: Brighton, UK

Re: One problem with IE only.

Post by panic! »

User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: One problem with IE only.

Post by pickle »

What does this have to do with PHP code? Nothing, I'd imagine.

Moving to Client Side
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
lovelf
Forum Contributor
Posts: 153
Joined: Wed Nov 05, 2008 12:06 am

Re: One problem with IE only.

Post by lovelf »

I am not sure about CSS being the solution for this, maybe if IE still suports custom scrollbars I might be able to show the locked scrollbar on white matching the background.
lovelf
Forum Contributor
Posts: 153
Joined: Wed Nov 05, 2008 12:06 am

Re: One problem with IE only.

Post by lovelf »

IE by default shows a locked scrollbar if there is no need to scroll content, to hide it the solution is to set the style of the scrollbar to a color matching the background.
lovelf
Forum Contributor
Posts: 153
Joined: Wed Nov 05, 2008 12:06 am

Re: One problem with IE only.

Post by lovelf »

Actually the best solution was to USE A PHP INCLUDE INSTEAD OF AN IFRAME SO IT WAS OK TO HAVE ADDED IT INTO THE PHP FORUM.
Post Reply