| View previous topic :: View next topic |
| Author |
Message |
DM
Joined: 27 Apr 2008 Posts: 12
|
Posted: Mon Apr 28, 2008 12:25 pm iFrames, white space before image appears. |
|
|
|
| Would greatly appreciate help with getting rid of white area in iFrame that appears before linked image loads in iFrame. Thanks in advance to anyone. |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8255 Location: Castle Rock CO USA
|
|
DM
Joined: 27 Apr 2008 Posts: 12
|
Posted: Mon Apr 28, 2008 4:45 pm |
|
|
|
Thanks so much responding.- Yes, the white space is in the iframe. - Sorry your 2nd question I don't understand: The background color of what? Your 3rd question: I don't understand either, therefore, your 4th question is also not clear to me. - I should explain. This is what I'm doing. - Please be patient.
I designed a page and developed it to have an iframe position absolute.
I have buttons targeting images to appear in the iframe. When i preview in a browser, the page appears. When I click on a button, the area of the iframe becomes white before the targeted image appears. - The second time I click on the button, there is no delay in loading, no white in the iframe.
I don't understand what is causing this. I very much appreciate you help. |
|
Straystudio
Joined: 14 Apr 2008 Posts: 255 Location: Nord Italy
|
Posted: Mon Apr 28, 2008 5:35 pm |
|
|
|
| DM wrote: |
| The second time I click on the button, there is no delay in loading, no white in the iframe. |
The second time, loading takes advandage of a short-term memory; to which, the system stores every new imported file it is handling.
The first time You click the button calling a new image, computer takes its time to completely download the .jpg file from the Web.
In the same while the system makes it appearing on Browser, as well stores it on the "cache" (on RAM memory or hard-disk).
But I do not know if You are talking about images linked from the Web, or stored in Your computer; or both.
<iframe frameborder="0" height="" width="" name="" allowTransparency="true" style="background-color: #00ff00;" src=""></iframe>
|
|
DM
Joined: 27 Apr 2008 Posts: 12
|
Posted: Mon Apr 28, 2008 6:05 pm |
|
|
|
Thanks for your explanation. My images jpg and jif are stored on my computer.
They load fast enough, but why is there a white color in the iframe before they load?
Any idea? |
|
sticks464
Joined: 31 Dec 2006 Posts: 1100
|
Posted: Mon Apr 28, 2008 7:24 pm |
|
|
|
| White is the default color for all object backgrounds unless you tell it differently with css. So the default background color for the i-frame will be whit and it will display until your browser or anyone else's can download the content that will fill the i-frame. |
|
DM
Joined: 27 Apr 2008 Posts: 12
|
Posted: Mon Apr 28, 2008 9:13 pm |
|
|
|
Thank you. I understand. - Does it follow then that I should make the background for the iframe transparent so that no white is visible before my images load? And, if so, how does one do that?
Thanks for your patience. |
|
sticks464
Joined: 31 Dec 2006 Posts: 1100
|
Posted: Tue Apr 29, 2008 3:47 am |
|
|
|
If it is borderless, why not make it the same color as the rest of the page and it's not even seen until the image loads. It's like Straystudio said
| Code: |
| <iframe frameborder="0" height="" width="" name="" allowTransparency="true" style="background-color: #00ff00;" src=""></iframe> |
Just change the color in the style
style="background-color: #00ff00; |
|
DM
Joined: 27 Apr 2008 Posts: 12
|
Posted: Tue Apr 29, 2008 9:58 am |
|
|
|
Thank you for your response. - Unfortunately your suggestion doesn't work for me. - Below is my code. Is there something there that is wrong or needs to be changed?
<body style= "margin: 0; padding 0; "background-color: transparent"><iframe src="images.html" name="images" width="368" height="350" scrolling="auto" frameborder="0" style="position:absolute; left: 316px; top: 103px;" allowtransparency+"true"></iframe>
Grateful for your help. |
|
DM
Joined: 27 Apr 2008 Posts: 12
|
Posted: Tue Apr 29, 2008 3:25 pm |
|
|
|
I am still trying to find a solution to getting rid of the white space that appears in my iframe area before my images load.
Help anyone. |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8255 Location: Castle Rock CO USA
|
|
DM
Joined: 27 Apr 2008 Posts: 12
|
Posted: Tue Apr 29, 2008 10:41 pm |
|
|
|
Thanks Corey. I've seen iframes used successfully in the manner that I'm trying to use them, and I like how my design looks and functions, except for the white area in the iframe before the image loads. -
It took me a long time to develop my page. I can't start over
I'd appreciate any help. |
|
sticks464
Joined: 31 Dec 2006 Posts: 1100
|
Posted: Wed Apr 30, 2008 3:31 am |
|
|
|
Add the background color
| Code: |
| <body style= "margin: 0; padding 0; "background-color: transparent"><iframe src="images.html" name="images" width="368" height="350" scrolling="auto" frameborder="0" style="position:absolute; left: 316px; top: 103px; background:00ff00" allowtransparency+"true"></iframe> |
|
|
DM
Joined: 27 Apr 2008 Posts: 12
|
Posted: Wed Apr 30, 2008 5:53 am |
|
|
|
Thanks for the suggestion...but adding color just made the iframe visible and bright green when my site appeared. - The white space was still there before my images when I clicked on a button.
Could it be that I have a preloading problem?
?? |
|
Corey Bryant Site Admin

Joined: 15 May 2004 Posts: 8255 Location: Castle Rock CO USA
|
Posted: Wed Apr 30, 2008 6:52 am |
|
|
|
If you seen some pages that appear like you like, you could share them with us and we could look at that source code to compare with what you have.
_________________
Corey
Toll Free Numbers | Merchant Accounts |
|
|