PDA

View Full Version : Problem with content box and Internet Explorer



EvanP
11-21-2005, 04:46 AM
Hey guys, I have come in search of help. I am wondering why I can see my site perfectly in the Firefox browser (my active one), but yet when I look at my site in Explorer, it only displays a white box. The site is for my online clan. www.socsquad.com


tr>
<td rowspan="7">
<img src="images/socsite2_28.gif" width="19" height="546" alt=""></td>
<td colspan="10" rowspan="3" background="images/socsite2_29.gif" width="396" height="416" align="left" valign="top">
<iframe name="main"src="home.html" width="386" height="406" align="right" noresize="noresize" scrolling="yes" frameborder="0"></iframe></td>
<td colspan="2" rowspan="5">
<img src="images/socsite2_30.gif" width="63" height="530" alt=""></td>
<td>
<img src="images/spacer.gif" width="1" height="290" alt=""></td>
</tr>

Please help :confused:

jscheuer1
11-21-2005, 06:41 AM
In FF for some reason, the page in the iframe (home.html) is given the default background color of the top page. If you were to view it alone in FF it would appear all white as well (as long as your browser colors are set to the defaults, which they probably are). Conversely, in IE, if I place my mouse inside the white area and hold down the left button while I drag the mouse across it, I can see the text as it becomes highlighted. Simply setting the background color of home.html to the same color as the top page should solve this. Make home.html's body tag look like this (additions red):


<body bgcolor="#1C4464" text="white" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="white" alink="white" vlink="white">

The default background (if not configured by the user) is usually white, and you've set all your text in the style section (color property) to #FFFFFF, which is also white.

This is a common problem that can occur whenever you do not explicitly set both a background and foreground color, which you always should do if you specify either. Even if the page looks OK to you, since someone may have their default background set to your specified foreground or the other way around, you are just asking for trouble if you do not set both when setting either one.

EvanP
11-21-2005, 09:50 PM
Umm thats pretty good, but what i had wanted was that the font show up over the background, if you get what i mean, its not just a color, its a gradient, its also sort of beveled, so its an image that i want it to appear over, is there any other way of doing this?

jscheuer1
11-21-2005, 10:20 PM
You can try going back to the way it was before and add this attribute to the iframe (along with the ones you already have):


<iframe allowtransparency="true"></iframe>

Or you can apply the image(s) you want as background to the page home.html. You still need a background color though, in case the images don't show up.

More on allowtransparency (http://msdn.microsoft.com/workshop/samples/author/dhtml/refs/allowTransparency.htm)

Wedgy
11-22-2005, 08:27 PM
Wow. Nice link, even though the text doesn't match what I am seeing in Firefox!

Twey
11-22-2005, 08:35 PM
allowTransparency is IE-only.
I thought you hated Firefox? :)

jscheuer1
11-22-2005, 11:09 PM
Perhaps it is growing on him. I have IE, Opera and FF now that I use regularly, there are still some things I like better/am more used to about IE but, the other two are very fine browsers. I really like the way Opera handles tabbed browsing (they are called pages in Opera, not tabs). For some reason it just seems more intuitive to me than the way FF does it.

I should have pointed out that allowtransparency is IE only, I just assumed that would be clear on the link but, Microsoft apparently doesn't care that folks know that on that page, assuming that they will only get there after reading all the other glock on that attribute that they have on their site.

One other thing, although Microsoft has it as allowTransparency, I no longer see any logical reason for using the camel notation for this or any other attribute. The browsers that require it in some situations are all dead, I think.

Twey
11-23-2005, 02:03 PM
I prefer to use some form of logical notation when possible, as it makes everything easier to read. I don't tend to use it because it makes for standard incompliancy (for some strict standards), but since allowTransparency is incompliant anyway, it doesn't really matter here.