Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
Thread: Style background inside IFRAME
06-02-2012, 10:24 AM #1
- Join Date
- May 2012
- Thanked 0 Times in 0 Posts
Style background inside IFRAME
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
<iframe src="videogal/vidgal.html" frameborder="0" width="600" height="700"></iframe>
Thanks in advance,
06-02-2012, 05:22 PM #2
Whatever is generating the page just needs to do the body tag as:
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.
06-03-2012, 12:34 PM #3
- Join Date
- Aug 2005
- Thanked 79 Times in 77 Posts
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☠ ☠