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 06-02-2012, 10:24 AM   PM User | #1
joep109
New to the CF scene

 
Join Date: May 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
joep109 is an unknown quantity at this point
Style background inside IFRAME

Hello,

Is it possible to style a background of a HTML page which is requested in the iframe?

This because im making a video gallery for a client.
Whenever he adds a new video, a completely new HTML file is generated with a white background color.

I then request it in my iframe with
Code:
<iframe src="videogal/vidgal.html" frameborder="0" width="600" height="700"></iframe>
I want the white to be transparent, but its hard for my client to edit the original html file each time he uploads a new video.

Thanks in advance,
Joep
joep109 is offline   Reply With Quote
Old 06-02-2012, 05:22 PM   PM User | #2
COBOLdinosaur
Regular Coder

 
COBOLdinosaur's Avatar
 
Join Date: Jul 2002
Location: Canada
Posts: 293
Thanks: 0
Thanked 18 Times in 18 Posts
COBOLdinosaur is an unknown quantity at this point
Whatever is generating the page just needs to do the body tag as:
<body style="background-color:transparent;">

Or include a stylesheet with that as a rule.

If the pages are being served from the same domain as the parent page, then you could probably do a scripted solution, but that would be rather excessive for such a simple problem.
__________________
100% standards compliant code is 100% correct 100% of the time.
one of my toys from my repository and perhaps some help getting help

Cd&
COBOLdinosaur is offline   Reply With Quote
Old 06-03-2012, 12:34 PM   PM User | #3
Major Payne
Regular Coder

 
Join Date: Aug 2005
Location: MS
Posts: 745
Thanks: 7
Thanked 65 Times in 63 Posts
Major Payne is an unknown quantity at this point
What you see as the white background may not be a background color being set by any CSS rule. A browser, by default, will show the color for web pages that the user has set in Options/Preferences. Even if you set the body tag to have a transparent color, the user's browser will just show its default color. If you link each page to an external CSS file, you can better control what the overall page looks like.

If you want the background of the iframe transparent, then set it with a CSS rule, but you'll still see the browser's default background color through the transparency. You could use CSS 3 for some great effects or make a small 1 X 1 px transparent or 25%-50% opaque image.
__________________
☠ ☠RON☠ ☠
Major Payne 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:28 PM.


Advertisement
Log in to turn off these ads.