Web Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignWeb Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old August 9th, 2006, 10:17 AM
SnapCracker's Avatar
SnapCracker SnapCracker is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: Kent, United Kingdom
Posts: 165 SnapCracker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 21 h 22 m 31 sec
Reputation Power: 4
Change background color of iFrame

Hi, I would like to change the background color of my iFrame, but it proving a little more difficult than I thought. On the iFame tag:-
<iframe name="results" src="results.php" marginwidth="0" marginheight="0" frameborder="0" scrolling="no" width="500" height="1200" style="background-color:#FF0000"></iframe>
This does provide a red background, it is still white.
Nor does style="color:#FF0000" instead of background.
Do you have to use allowtransparency="true"? or something on these lines?

Reply With Quote
  #2  
Old August 9th, 2006, 03:41 PM
Kravvitz Kravvitz is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2005
Location: USA
Posts: 134 Kravvitz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 h 38 m 30 sec
Reputation Power: 4
Set the background color in the document you are loading into the <iframe>.

It is better to use PHP includes or SSI instead of frames and iframes.

Reply With Quote
  #3  
Old August 9th, 2006, 04:10 PM
SnapCracker's Avatar
SnapCracker SnapCracker is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: Kent, United Kingdom
Posts: 165 SnapCracker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 21 h 22 m 31 sec
Reputation Power: 4
I can see where our conversation is going if I told you that the table size is 1 pixel smaller than the iFrame size and one can see white edges. Also, I'm displaying results from SQL database with variable length, so when it's short there is a big white space at the bottom. But I can see that wild horses won't get me the way to set the background color! No, only joking, yes I think the best way to do it would be to enlarge the table size and make the iFrame height 100% to vary the height according the amount of data. You see I can't talk to MadCowDzz about iFrames cos he hates them; not PDA compliant or future proof.

Reply With Quote
  #4  
Old August 10th, 2006, 07:49 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
I didn't even have to say it this time...

Have you considered Javascript/DOM ways to do it?
Not sure if it's possible, just tossing it out as a suggestion.

[I think you have JS/DOM questions and iFrames before?]
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter!
DevArticles Forum Moderator

"The net is a waste of time, and that's exactly what's right about it." -- William Gibson

Reply With Quote
  #5  
Old August 10th, 2006, 01:22 PM
SnapCracker's Avatar
SnapCracker SnapCracker is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: Kent, United Kingdom
Posts: 165 SnapCracker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 21 h 22 m 31 sec
Reputation Power: 4
Quote:
Originally Posted by MadCowDzz
Have you considered Javascript/DOM ways to do it?


To make the background color or an alternative to iFrames?

It all look highly complicated for which should be a simple HTML option.

Reply With Quote
  #6  
Old August 10th, 2006, 04:19 PM
Kravvitz Kravvitz is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2005
Location: USA
Posts: 134 Kravvitz User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 23 h 38 m 30 sec
Reputation Power: 4
I already told you how to do it. Read the first sentence of my first reply again.

Reply With Quote
  #7  
Old August 10th, 2006, 06:04 PM
SnapCracker's Avatar
SnapCracker SnapCracker is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: Kent, United Kingdom
Posts: 165 SnapCracker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 21 h 22 m 31 sec
Reputation Power: 4
Why is it like the Da Vinci Code?! Sorry, yes at first I took your advise and tried to change the bgcolor of the table, forgetting all about the CSS style in the head. Upon changing this it all worked. So it is quite easy and I messed up abit. Thanks again Krav.

Reply With Quote
  #8  
Old August 11th, 2006, 08:02 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
I meant to use DOM to change the background colour of the iFrame...
Not to encourage the use of iFrame, but to solve the problem at hand.

sounds like you solved it though?

Reply With Quote
  #9  
Old September 27th, 2006, 03:53 PM
SnapCracker's Avatar
SnapCracker SnapCracker is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: Kent, United Kingdom
Posts: 165 SnapCracker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 21 h 22 m 31 sec
Reputation Power: 4
This is for Dzzzzzzz

I stumbled across this the other day, a forum for women web developers who seem to be sympathic to people who would like to use iFrames!

http://forums.bellaonline.com/showthreaded.php?Cat=0&Number=22814903&page=0&vc=1

if you can stand it, read at your peril!
Comments on this post
MadCowDzz agrees: This makes me a sad panda.

Reply With Quote
  #10  
Old September 28th, 2006, 08:44 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 14 m 9 sec
Reputation Power: 8
Insert derogatory comment about women in the work place (joke!!!)

Did you dig this up just for me? =P

Let me get in there, I'll straighten them around.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignWeb Development > Change background color of iFrame


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT