CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   HTML & CSS (http://www.codingforums.com/forumdisplay.php?f=13)
-   -   help with Javascript for style a external Iframe (http://www.codingforums.com/showthread.php?t=283114)

maryano 11-28-2012 02:48 AM

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.

sunfighter 11-28-2012 01:58 PM

In the iframe definition add allowtransparency="true"
See if that helps.

maryano 11-29-2012 04:39 PM

Thanks for the idea, but it doesn't work.

sunfighter 11-29-2012 07:52 PM

Maybe you should post the code your using and not a snip it.

maryano 11-30-2012 03:10 AM

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">

webdevs 11-30-2012 10:52 AM

May be you needs to write transparency css on class called "modelo3" I am not sure but may be you can do using CSS3

VIPStephan 11-30-2012 10:56 AM

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.

maryano 12-04-2012 11:53 PM

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


All times are GMT +1. The time now is 07:20 PM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.