Current location: Hot Scripts Forums » General Web Coding » HTML/XHTML/XML » Background image for iframe same as main page


Background image for iframe same as main page

Reply
  #1 (permalink)  
Old 08-09-04, 09:35 AM
riots riots is offline
New Member
 
Join Date: Aug 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Background image for iframe same as main page

Please could anyone tell me if one can reliably set the background image for an iframe to be the same as the page that holds it? In other words have a single background image across the whole page including the iframe. You can see what I'm trying to do in http://www.duesouth.jp. I want the "Home" iframe to have a transparent background (i.e. you can see the compass) but the other menu items to show a light blue colour - which works OK. It seems to work work the way I want it in Safari but in IE you get a horrible green colour.
Reply With Quote
  #2 (permalink)  
Old 02-15-06, 10:30 PM
riots riots is offline
New Member
 
Join Date: Aug 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
I've been getting quite a lot of hits on my site from this thread so it seems a fair number of people are interested in this question. I did eventually find the answer which is simply to use <iframe allowtransparency="true"> combined with <body bgcolor="transparent"> in the inner page. Old (5.0 or less) versions of IE display a rather horrible green colour, but otherwise it seems to work fine.

My website has now moved to http://homepage.mac.com/riots/duesouth/ if you want to see this in action.
Reply With Quote
  #3 (permalink)  
Old 02-16-06, 08:25 AM
coolmark18's Avatar
coolmark18 coolmark18 is offline
Newbie Coder
 
Join Date: Oct 2005
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
try in your iframe code allowtransparency=yes that worked for me at www.phew-scotland-respite.org.
Reply With Quote
  #4 (permalink)  
Old 02-16-06, 09:03 AM
riots riots is offline
New Member
 
Join Date: Aug 2004
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks yes that is what I am doing & works OK.
Reply With Quote
  #5 (permalink)  
Old 02-17-06, 09:03 AM
Web-Frenzy Web-Frenzy is offline
Newbie Coder
 
Join Date: Feb 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Unfortunatley, ive had the same problem myself, your best bet is to make it a solid color. When you change the window size it will move the background image and make it uneven. And it varys by browser and by resolution. If you find something please advise me, its a touchy situation.
Reply With Quote
  #6 (permalink)  
Old 02-17-06, 09:06 AM
coolmark18's Avatar
coolmark18 coolmark18 is offline
Newbie Coder
 
Join Date: Oct 2005
Posts: 94
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by Web-Frenzy
Unfortunatley, ive had the same problem myself, your best bet is to make it a solid color. When you change the window size it will move the background image and make it uneven. And it varys by browser and by resolution. If you find something please advise me, its a touchy situation.
The allowtransparency=yes works fine in both FireFox & Internet Explorer. See the example I gave: www.phew-scotland-respite.org
Changing the Window size has no effect.
Reply With Quote
  #7 (permalink)  
Old 02-17-06, 11:22 AM
Christian's Avatar
Christian Christian is offline
Community VIP
 
Join Date: Mar 2005
Location: ProgrammingTalk
Posts: 2,449
Thanks: 0
Thanked 6 Times in 5 Posts
This is the code that they are talking about
Code:
<iframe src="page.html" frameborder="0" scrolling="yes" name="content" width="100" allowtransparency="true" height="50"></iframe>
__________________
:: ImperialBB :: New version in the works! :: http://www.imperialbb.com ::

:: Have a question about the board? The Rules? An Infraction/Warning? :: Contact Form ::
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Classified Ads skipper23 Perl 3 11-22-05 02:22 AM
base64_decode an image, works on blank page, not on page where text is.. Acecool PHP 2 08-09-04 01:16 PM
Image moved after alteration to page Tyreal HTML/XHTML/XML 3 07-21-04 03:12 AM
fading background image script... pedro Script Requests 1 07-20-04 10:27 AM
Classified Ads skipper23 Perl 2 12-30-03 03:43 AM


All times are GMT -5. The time now is 10:15 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.