|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
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? |
|
#2
|
|||
|
|||
|
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. |
|
#3
|
||||
|
||||
|
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.
|
|
#4
|
||||
|
||||
|
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 |
|
#5
|
||||
|
||||
|
Quote:
To make the background color or an alternative to iFrames? It all look highly complicated for which should be a simple HTML option. |
|
#6
|
|||
|
|||
|
I already told you how to do it.
Read the first sentence of my first reply again. |
|
#7
|
||||
|
||||
|
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.
|
|
#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? |
|
#9
|
||||
|
||||
|
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! |
|
#10
|
||||
|
||||
|
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. ![]() |
![]() |
| Viewing: Dev Articles Community Forums > Web Design > Web Development > Change background color of iFrame |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|