HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
iFrames, white space before image appears.
Goto page 1, 2  Next
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Frame
View previous topic :: View next topic  
Author Message
DM



Joined: 27 Apr 2008
Posts: 12

PostPosted: Mon Apr 28, 2008 12:25 pm     iFrames, white space before image appears. Reply with quote

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

PostPosted: Mon Apr 28, 2008 12:51 pm     Reply with quote



Is the white in the iframe? If so, is it the background color?

Does the iframe have a background image? If so, is that image pretty large and taking some time to load?

_________________
Corey
Toll Free Solutions | Mile High Merchant Accounts | Expression Web Blog
DM



Joined: 27 Apr 2008
Posts: 12

PostPosted: Mon Apr 28, 2008 4:45 pm     Reply with quote

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

PostPosted: Mon Apr 28, 2008 5:35 pm     Reply with quote

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

PostPosted: Mon Apr 28, 2008 6:05 pm     Reply with quote

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

PostPosted: Mon Apr 28, 2008 7:24 pm     Reply with quote

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

PostPosted: Mon Apr 28, 2008 9:13 pm     Reply with quote

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

PostPosted: Tue Apr 29, 2008 3:47 am     Reply with quote

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

PostPosted: Tue Apr 29, 2008 9:58 am     Reply with quote

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

PostPosted: Tue Apr 29, 2008 3:25 pm     Reply with quote

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

PostPosted: Tue Apr 29, 2008 6:01 pm     Reply with quote

Any reason you are using them? Frames in general are problematic as you can see.

_________________
Corey
Residential Office Solutions | Mile High Merchant Accounts | Expression Web Blog
DM



Joined: 27 Apr 2008
Posts: 12

PostPosted: Tue Apr 29, 2008 10:41 pm     Reply with quote

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

PostPosted: Wed Apr 30, 2008 3:31 am     Reply with quote

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

PostPosted: Wed Apr 30, 2008 5:53 am     Reply with quote

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

PostPosted: Wed Apr 30, 2008 6:52 am     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Frame All times are GMT - 8 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial