Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-28-2012, 02:48 AM   PM User | #1
maryano
New to the CF scene

 
Join Date: Nov 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
maryano is an unknown quantity at this point
help with Javascript for style a external Iframe

Hello,

i need to add style="background:transparent" in the body of an external frame:

<iframe name="frm" src="external link">
#document
{<html>
<head>...</head>
<body class="modelo3" style="background: transparent;">

.....

</body>
}

</iframe>

I tried with javascript, but no way.

Thanks in advance.
maryano is offline   Reply With Quote
Old 11-28-2012, 01:58 PM   PM User | #2
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,495
Thanks: 18
Thanked 361 Times in 360 Posts
sunfighter is on a distinguished road
In the iframe definition add allowtransparency="true"
See if that helps.
sunfighter is offline   Reply With Quote
Old 11-29-2012, 04:39 PM   PM User | #3
maryano
New to the CF scene

 
Join Date: Nov 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
maryano is an unknown quantity at this point
Thanks for the idea, but it doesn't work.
maryano is offline   Reply With Quote
Old 11-29-2012, 07:52 PM   PM User | #4
sunfighter
Senior Coder

 
Join Date: Jan 2011
Location: Missouri
Posts: 2,495
Thanks: 18
Thanked 361 Times in 360 Posts
sunfighter is on a distinguished road
Maybe you should post the code your using and not a snip it.
sunfighter is offline   Reply With Quote
Old 11-30-2012, 03:10 AM   PM User | #5
maryano
New to the CF scene

 
Join Date: Nov 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
maryano is an unknown quantity at this point
Code:
<div class="custom"  >
	<iframe frameborder="0" height="395" scrolling="no" src="EXTERNAL LINK" width="648">
</iframe>
</CODE>

The code of the external frame is:

<CODE>
#DOCUMENT
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
 <html lang="es">
 <head>
  <meta http-equiv="Content-type" content="text/html; charset=UTF-8">
  
 <!-- CSS -->
 <link rel=.../>
 <link rel=.../>
  <link rel=.../>
 </head>

 <body class='modelo2'>

...
...
more code of body that cames from the external frame...
...

</iframe></div>

AND I NEED TO PUT IN SOMEWAY <body class='modelo2' style="background:transparent">
maryano is offline   Reply With Quote
Old 11-30-2012, 10:52 AM   PM User | #6
webdevs
New Coder

 
Join Date: Nov 2012
Location: India
Posts: 52
Thanks: 0
Thanked 3 Times in 3 Posts
webdevs is an unknown quantity at this point
May be you needs to write transparency css on class called "modelo3" I am not sure but may be you can do using CSS3
webdevs is offline   Reply With Quote
Old 11-30-2012, 10:56 AM   PM User | #7
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,697
Thanks: 5
Thanked 875 Times in 850 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
The body has no intrinsic background color, so there’s no point in setting it to “transparent”. I suppose you want the iframe to have a transparent background color?
It would help if you showed us a live example and mentioned the browser in which the issue occurs.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 12-04-2012, 11:53 PM   PM User | #8
maryano
New to the CF scene

 
Join Date: Nov 2012
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
maryano is an unknown quantity at this point
css class "modelo3" has a background defined... and i need to overwrite it using "style='background...'

this is my iframe: http://booking.iberiatrip.com/public...321/2240371588
maryano is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 11:45 PM.


Advertisement
Log in to turn off these ads.