Help with Transparent Background

  • Sohaib
  • Proficient
  • Proficient
  • User avatar
  • Posts: 327
  • Loc: Las Vegas

Post 3+ Months Ago

Hi,
Iam trying to make transparent background for a page so in iframe it will be text only... But I don't actually know how to... :cry:

Code: [ Select ]
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<table width="411">
 <tr>
  <td WIDTH=411 HEIGHT=370" valign="top">
  1. <BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
  2. <table width="411">
  3.  <tr>
  4.   <td WIDTH=411 HEIGHT=370" valign="top">


i've tried replacing FFFFFF with Transparent but it wouldn't work.
Any suggestions

Thanks
  • rajputkashyap
  • Graduate
  • Graduate
  • User avatar
  • Posts: 198
  • Loc: USA

Post 3+ Months Ago

Transparent webpage? didnt get, by default if you dont provide any background it will take White color as default, however if you with you can make one pixel trasparent image using photoshop and include that in your webpage, thats the only way to make transparent background...

kashyap
  • Mas Sehguh
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1853

Post 3+ Months Ago

Have you tried doing:

<iframe style="background: transparent;" ...

and in the framed file,

<body style="background: transparent;" ...
  • Mas Sehguh
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1853

Post 3+ Months Ago

Sohaib wrote:
Hi,
Iam trying to make transparent background for a page so in iframe it will be text only... But I don't actually know how to... :cry:

Code: [ Select ]
<BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
<table width="411">
 <tr>
  <td WIDTH=411 HEIGHT=370" valign="top">
  1. <BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0>
  2. <table width="411">
  3.  <tr>
  4.   <td WIDTH=411 HEIGHT=370" valign="top">



i've tried replacing FFFFFF with Transparent but it wouldn't work.
Any suggestions

Thanks


This code has syntax errors by the way, besides the harmless leftmargin, topmargin, and friends.

You have a stray quote on the TD's height attribute, and the #FFFFFF value should be quoted because it contains the number sign.

"Transparent" is not a valid HTML color name; it exists in the CSS language family.
  • zcorpan
  • Student
  • Student
  • zcorpan
  • Posts: 77

Post 3+ Months Ago

the html and body elements are as default transparent. The iframe, OTOH, has a background color.

So you only have to make the iframe transparent with CSS, as Sam Hughes wrote.
  • lioness
  • Mastermind
  • Mastermind
  • User avatar
  • Posts: 1615

Post 3+ Months Ago

In CSS,
Code: [ Select ]
background:none;
works for me.
  • lilstorm
  • Graduate
  • Graduate
  • User avatar
  • Posts: 162
  • Loc: New York

Post 3+ Months Ago

Ok I am having the same problem. I have a background for my page and want my iframe to be transparent so part of the background shows through.

It works fine in firefox but in IE it shows it in a white box.

I have tried css which would be:

Code: [ Select ]
<style type="text/css">
body {background:none;
}
</style>
  1. <style type="text/css">
  2. body {background:none;
  3. }
  4. </style>


didn't work? or did i just do it wrong?


and I also tried what Sam wrote with no luck either?

Thanks.
  • munkimagik
  • Born
  • Born
  • munkimagik
  • Posts: 1

Post 3+ Months Ago

Hi there know this is an old post but I have found the solution to this after much searching, and this was the first forum I found on this subject, and the solution isn't here so I thought I'd add it on for anyone like me stumbling across this one first....

for IE to have transparent iframes with in the iframe tag add...

allowtransparency="true"

this cannot go in the style sheet because it's an IE thing

you also need
iframe {background:transparent;}
in your style sheet or

style="background:transparent;" in your iframe tag too

best of luck
  • futuramerlin-com
  • Newbie
  • Newbie
  • futuramerlin-com
  • Posts: 5

Post 3+ Months Ago

Validator says that this solution is not valid for HTML 4.01 Transitional. (http://www.futuramerlin.com/). Is there a valid solution? Thank you for any help.
  • futuramerlin-com
  • Newbie
  • Newbie
  • futuramerlin-com
  • Posts: 5

Post 3+ Months Ago

Ahhh. I just thought of it. JavaScript browser detection. Ok. Thanks anyway.
  • sharweb
  • Born
  • Born
  • sharweb
  • Posts: 1

Post 3+ Months Ago

the html and body elements are as default transparent. The iframe, OTOH, has a background color.

So you only have to make the iframe transparent with CSS and it will work.....

Also you can use some java script and css combination...

Post Information

  • Total Posts in this topic: 11 posts
  • Users browsing this forum: No registered users and 65 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
cron
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.