iframe background color

Reply

Join Date: Sep 2009
Posts: 1
Reputation: freggel2 is an unknown quantity at this point 
Solved Threads: 0
freggel2 freggel2 is offline Offline
Newbie Poster

Re: iframe background color - pls help

 
0
  #1
Sep 1st, 2009
What am i doing wrong? My iframe background stays white.
It must be black.
Can anyone help me plz?

HTML and CSS Syntax (Toggle Plain Text)
  1. <HTML>
  2. <HEAD>
  3. <TITLE>Untitled-1</TITLE>
  4. <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
  5. <style type="text/css">
  6. <!--
  7. body { background-color:#000000;
  8. }
  9. -->
  10. </style></HEAD>
  11. <BODY BGCOLOR="#000000" LEFTMARGIN="0" TOPMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
  12. <!-- ImageReady Slices (Untitled-1) -->
  13. <TABLE WIDTH="1024" BORDER="0" CELLPADDING="0" CELLSPACING="0">
  14. <TR>
  15. <td COLSPAN="8" style="background: url('images/banner.gif'); width:1024px; height:52px" valign="top">&nbsp; </td>
  16.  
  17. </TR>
  18. <TR>
  19. <td ROWSPAN="2" style="background: url('images/banner_02.gif'); width:115px; height:716px" valign="top">&nbsp; </td>
  20.  
  21. <TD>
  22. <A HREF="C:\charissa\cbackup\Prijzen\prijzen.html" TARGET="index">
  23. <IMG SRC="images/prijzen.gif" WIDTH=169 HEIGHT=53 BORDER=0 ALT="Prijzen"></A></TD>
  24. <TD>
  25. <A HREF="C:\charissa\cbackup\informatie.html" target="index">
  26. <IMG SRC="images/Info.gif" WIDTH=101 HEIGHT=53 BORDER=0 ALT="Informatie"></A></TD>
  27. <TD>
  28. <A HREF="/heren/heren.html">
  29. <IMG SRC="images/men.gif" WIDTH=88 HEIGHT=53 BORDER=0 ALT="Heren kapsels"></A></TD>
  30. <TD>
  31. <A HREF="/dames/dames.html">
  32. <IMG SRC="images/women.gif" WIDTH=114 HEIGHT=53 BORDER=0 ALT="Dames kapsels"></A></TD>
  33. <TD>
  34. <A HREF="/afspraak.html">
  35. <IMG SRC="images/afspraak.gif" WIDTH=164 HEIGHT=53 BORDER=0 ALT="Afspraak maken"></A></TD>
  36. <TD>
  37. <A HREF="/aanb/aanb.html">
  38. <IMG SRC="images/aanbieding.gif" WIDTH=199 HEIGHT=53 BORDER=0 ALT="Aanbiedingen"></A></TD>
  39. <TD ROWSPAN=2>
  40. <IMG SRC="images/rechts.gif" WIDTH=74 HEIGHT=716 ALT=""></TD>
  41. </TR>
  42. <TR>
  43. <td COLSPAN="6" bordercolor="#000000" background="images/index.gif" bgcolor="#000000" style="background: #000000; width:835px; height:663px"><iframe frameborder="0" height="100%" width="100%" name="index" style="background-color:"#000000" > </iframe>
  44. &nbsp; </td>
  45.  
  46. </TR>
  47. </TABLE>
  48. <!-- End ImageReady Slices -->
  49. </BODY>
  50. </HTML>
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 821
Reputation: Airshow is on a distinguished road 
Solved Threads: 116
Airshow's Avatar
Airshow Airshow is offline Offline
Practically a Posting Shark

Re: iframe background color

 
0
  #2
Sep 1st, 2009
freggel2,

You need to style the document(s) that appear in the iframe with a black background, rather than the iframe itself.

Airshow
50% of the solution lies in accurately describing the problem!
Reply With Quote Quick reply to this message  
Join Date: Jun 2008
Posts: 348
Reputation: Troy III will become famous soon enough Troy III will become famous soon enough 
Solved Threads: 42
Troy III's Avatar
Troy III Troy III is offline Offline
Posting Whiz

Re: iframe background color - pls help

 
0
  #3
Sep 2nd, 2009
Originally Posted by freggel2 View Post
What am i doing wrong? My iframe background stays white.
It must be black.
Can anyone help me plz?
you can also watch here for more universal solution and controll over the Iframe background color from its parent.

The script allows you to set the background color of your iframe(s) from its parent and/or default/adopt to the main page background color automaticaly.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 5
Reputation: lbechtum is an unknown quantity at this point 
Solved Threads: 0
lbechtum lbechtum is offline Offline
Newbie Poster

Iframe Background

 
0
  #4
30 Days Ago
Edited response and reposted below
Last edited by lbechtum; 30 Days Ago at 9:21 am.
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 5
Reputation: lbechtum is an unknown quantity at this point 
Solved Threads: 0
lbechtum lbechtum is offline Offline
Newbie Poster

Iframe Background

 
0
  #5
30 Days Ago
Not sure if you are still monitoring this thread but if you are I did some research on this for a class that I am teaching. There are a lot of elitist responses out there concerning this question. They hate iframes, they hate microsoft, they like to belittle those who do not already have the answer. The bottom line is that when the viewer of the web page is using internet explorer (older or new) they will always see a white background. It is true as many respondents have chided those seeking an answer, that the color of the document will determine the background color, dah.

Iframes are a good choice for displaying image galleries and when you display a gallery in an Iframe you typically do not put the image on a page with a background and images have a habit of being different sizes and orientations. When you have variatiions in dimensions and orientation you wind up with the white background showing through. You are not left without options but each one requires addtional work or a different gallery display choice.

1. You could put each image on a seperate html page with a background color that matches the page or table background color. For best results put the image inside of a table that matches the size of he iframe and use a background color in the table that matches the page color.
2. You could, and this is the option I use when working with an Iframe presentation, first do your image work and make each image exactly the same dimension as the rest. If I have an image that is a different orientation then I create a new image into which I place the original. The new image has a background that is of the same size and layout as the rest of the images and has a background color appropriate for the page I am lookng at. Your odd image is floating in the larger new image with a background around it.
3. Create a slide show using javascript, Adobe Photoshop or a javascript editor. In each case you can define a background color. Expression Web has display options within the toolbox taskpane that you can place a slide show done with Adobe.

Hope this helps
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 821
Reputation: Airshow is on a distinguished road 
Solved Threads: 116
Airshow's Avatar
Airshow Airshow is offline Offline
Practically a Posting Shark
 
0
  #6
30 Days Ago
Originally Posted by lbechtum View Post
The bottom line is that when the viewer of the web page is using internet explorer (older or new) they will always see a white background. It is true as many respondents have chided those seeking an answer, that the color of the document will determine the background color, dah.
I'm not sure I understand. Are you saying that IE will always give an iframe a white background (regardless of the document displayed in it)? Or are you saying that such advice is incorrect?

Airshow
50% of the solution lies in accurately describing the problem!
Reply With Quote Quick reply to this message  
Join Date: Aug 2009
Posts: 12
Reputation: koyel555 is an unknown quantity at this point 
Solved Threads: 0
koyel555 koyel555 is offline Offline
Newbie Poster
 
0
  #7
30 Days Ago
Wrong code:
<iframe frameborder="0" height="100%" width="100%" name="index" style="background-color:"#000000" > </iframe>
Instead of
style="background-color:"#000000" write
style="background-color:'#000000' " The quotations are not properly closed.
Last edited by peter_budo; 30 Days Ago at 4:31 pm. Reason: Keep It Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 5
Reputation: lbechtum is an unknown quantity at this point 
Solved Threads: 0
lbechtum lbechtum is offline Offline
Newbie Poster

Iframe background

 
0
  #8
30 Days Ago
Originally Posted by Airshow View Post
I'm not sure I understand. Are you saying that IE will always give an iframe a white background (regardless of the document displayed in it)? Or are you saying that such advice is incorrect?

Airshow
What I am saying, is, in the abscence of a page or image present in the iframe the background color will be white regardless of what code you add. If no document or picture is present the color inside of the Iframe, the background will be white when using IE.
Reply With Quote Quick reply to this message  
Join Date: Apr 2009
Posts: 821
Reputation: Airshow is on a distinguished road 
Solved Threads: 116
Airshow's Avatar
Airshow Airshow is offline Offline
Practically a Posting Shark
 
0
  #9
29 Days Ago
lbechtum,

Originally Posted by lbechtum View Post
What I am saying, is, in the abscence of a page or image present in the iframe the background color will be white regardless of what code you add. If no document or picture is present the color inside of the Iframe, the background will be white when using IE.
Now I'm really confused.

If the first statement is true, then it seems to me that the second statement MUST also be true. What does the second statement say about IE that is not already covered by the first?

Airshow
Last edited by Airshow; 29 Days Ago at 8:26 pm.
50% of the solution lies in accurately describing the problem!
Reply With Quote Quick reply to this message  
Join Date: Oct 2009
Posts: 5
Reputation: lbechtum is an unknown quantity at this point 
Solved Threads: 0
lbechtum lbechtum is offline Offline
Newbie Poster
 
0
  #10
25 Days Ago
both statements say the same thing....you cannot control the background color of an Iframe when viewing it using IE. The only time the background color will be other than white is when the background color of the content being displayed inside of the Iframe has a color other than white.
Reply With Quote Quick reply to this message  
Reply

Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC