Skip to main content
gamedev.net
🔒 Locked

[web] Trasparent Backgrounds using Frames

Started by Terlenth Jun 6, 2006 at 10:20 AM 3 replies 950+ views
Original Post
Terlenth
Terlenth
I'm currently working on the finishing touches in terms of the graphic side to my site and I want to be able to have an image as the background below my header. Now I understand how to do this (for the most part, still learning) but the big issue that I can forsee is that I use frames to place my information. Now, I want to be able to view this background through these frames but I can see this causing issues unless there is a way to cause a transparent background on said frames (or I can try to create images specifically for said frames). Any advice? Thanks in advance
--Ter'Lenth
Sander
Sander
Uh, why not dump frames alltogether? Divs are easy to use, and you can get scrollbars too by playing with the overflow CSS variable.
Terlenth
Terlenth
Okay, well technically I am using Divs just didn't have the proper terminology. I've got the CSS currently set up, I just need to figure out how to set up the rest.
--Ter'Lenth
Sander
Sander
Divs are transparent by default IIRC, so you should be all set. If you have trouble, just set background: none; on them.
david6327
david6327
I deal with iframes on a daily bases. and I happened to have the source code. Here's one source code.
Path #1:
<iframe allowTransparency="true" width="783" height="315" name="main" border="0" frameborder="0" scrolling="no" leftmargin="0" marginwidth="0" topmargin="0" marginheight="0" src="home.html"></iframe>and inside home.html put this in the header.<style type="text/css"><!--body {background-color: transparent}--></style>


and here's another that I coincidently found out. just simple add this line on top of your html file, even before the
<!DOCTYPE HTML SYSTEM>

this will automatically give your iframes transparency properties.

iframes have their goods and bads, but generally, they are convenient, but ultimately should be avoided at all cost when it comes down to dynamic content that requires iframes to communicate with each other. One programmer can use cookies for the iframes to communicate with each other, but it seems like some people like to keep their cookies off, and in case of shopping malls? When money is involved, things should be more perfect. So, it really depends on many factors.

On the other hand, if you have a professionally made elegant flash menu as your main menu, you should use iframes if it doesn't have any dynamic content, it saves download and reloading time and if you need to change one little thing on the main structure, you only need to change one thing.

CSS is nice too, but they take time to learn. If you're profession is not web-development I don't recommend that you go in depth with CSS, it's not that that hard but it can be quite annoying. But here's a great website that has most information on CSS ( and if it's not in the notice this site should be added )
http://www.w3schools.com/css/css_reference.asp

Hope I was some help.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.