Page 1 of 1

iframes usage? [Solved]

Posted: Mon Oct 31, 2005 6:29 pm
by J_Iceman05
i have a page and i want them to be able to scroll certain sections if needed (based on data from the database)

say....
there is a table containing the year, bill amount, how much they paid at this time, the date of transaction, and payment method.
but i have limited height for the table. so if the person only has 2 or 3 records of this, then it would be fine.
but if they have 10, then the whole thing gets distorted. so if they have too many entries then it needs to scroll

i would think that iframes would do this just fine, but i dont know how transfer the information between them.
I dont know how i would make the table in the iframe.

I welcome all comments and input. Thank you for your time

Posted: Mon Oct 31, 2005 7:05 pm
by feyd
why not emit an allowance for scrolling when the data reaches a certain number of records? i.e. tell it via CSS that the table can scroll when you hit a specified length of rows?

Posted: Tue Nov 01, 2005 12:03 pm
by J_Iceman05
how do i specify that?

overflow:scroll; i know of
i tried using height and i even tried size but neither do anything, whether i have one entry, or 20, there is no scrolling...
what is the css tag i need to make it scroll how i want?

Posted: Tue Nov 01, 2005 12:32 pm
by Chris Corbyn
J_Iceman05 wrote:how do i specify that?

overflow:scroll; i know of
i tried using height and i even tried size but neither do anything, whether i have one entry, or 20, there is no scrolling...
what is the css tag i need to make it scroll how i want?
overflow: auto or overflow: scroll yes.

It won't work with tables or table cells though.... it needs to work with block-level xhtml elements.

Put a <div> inside your table cell or iframe that is the correct dimensions and then apply the property to that :)

Posted: Tue Nov 01, 2005 3:16 pm
by J_Iceman05
That works great. Thank you both for the replies.
I wasn't using a div... i was trying to put the css straight onto the table ::smacks himself in the head::

Thank you again, and keep up the good work.

Posted: Thu Nov 03, 2005 12:28 pm
by J_Iceman05
ok... i think i jumped the gun alittle when i said it was solved and it all worked fine and dandy...

now, the problem is... this table scrolling doesn't work in IE... good old microsoft back again
if everyone used firefox it would work great; but a lot of people use IE, so i have to make it compatible...
i'm back to the iframe question, unless there is something that can be done to make this work in IE as well...
... maybe i am just using it incorrectly (wouldn't be surprised...)

Code: Select all

<style>
	.scroll {overflow:auto; overflow-y:auto; height:120px; width:570px;}
</style>
from what i could gather on the net (and understand) this would scroll vertically and horizontally...

Thanks again for your help.

Posted: Thu Nov 03, 2005 12:34 pm
by Chris Corbyn
J_Iceman05 wrote:ok... i think i jumped the gun alittle when i said it was solved and it all worked fine and dandy...

now, the problem is... this table scrolling doesn't work in IE... good old microsoft back again
if everyone used firefox it would work great; but a lot of people use IE, so i have to make it compatible...
i'm back to the iframe question, unless there is something that can be done to make this work in IE as well...
... maybe i am just using it incorrectly (wouldn't be surprised...)

Code: Select all

<style>
	.scroll {overflow:auto; overflow-y:auto; height:120px; width:570px;}
</style>
from what i could gather on the net (and understand) this would scroll vertically and horizontally...

Thanks again for your help.
Just "overflow: auto;" will make it scroll vertically and horizontally. "overflow-y:" is invalid CSS (MS-specific?).

Make sure that your div has fixed width and height.

Posted: Thu Nov 03, 2005 12:38 pm
by J_Iceman05
... i feel dumber and dumber everyday it seems...
take out the overflow-y and it seems to be working correctly in both browsers.

Thanks again