Page 1 of 1
One problem with IE only.
Posted: Tue Dec 02, 2008 12:35 pm
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
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?
Re: One problem with IE only.
Posted: Tue Dec 02, 2008 2:08 pm
by requinix
Why use a table in the first place? Get rid of it, it serves no purpose.
Re: One problem with IE only.
Posted: Tue Dec 02, 2008 2:20 pm
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.
Re: One problem with IE only.
Posted: Tue Dec 02, 2008 2:39 pm
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?
Re: One problem with IE only.
Posted: Tue Dec 02, 2008 2:58 pm
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.
Re: One problem with IE only.
Posted: Tue Dec 02, 2008 3:06 pm
by panic!
Re: One problem with IE only.
Posted: Tue Dec 02, 2008 3:08 pm
by pickle
What does this have to do with PHP code? Nothing, I'd imagine.
Moving to Client Side
Re: One problem with IE only.
Posted: Tue Dec 02, 2008 3:11 pm
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.
Re: One problem with IE only.
Posted: Tue Dec 02, 2008 3:23 pm
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.
Re: One problem with IE only.
Posted: Wed Dec 03, 2008 8:16 am
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.