PDA

View Full Version : CSS in iFrame works in FF but not IE



adstudio3d
January 8th, 2007, 04:32 PM
I hate working with iFrames but I have to this time...

I have a page with an iFrame which loads an html page.
I have an external .CSS file for the copy on the pages.
When I load the page in FireFox it works right, but when I load it in IE it doesn't...

If you want to see:
http://www.emersonradio.com/test2
In the menu, click on clock radio. Then click on the first product.

CSS file


model_text
{
color:#0152a1;
font-size:14px;
font:Arial, Helvetica, sans-serif
}

content_text
{
color:#666666;
font-size:10px;
font:Arial, Helvetica, sans-serif
}

content_text_bold
{
font:Arial, Helvetica, sans-serif;
font-size:10px;
color:#464646;
font-weight:bold
}

content_text_blue
{
color:#0152a1;
font-size:10px;
font:Arial, Helvetica, sans-serif;
font-weight:bold
}

a {text-decoration: none}
a:link {color:#0152a1}
a:visited {color:#0152a1}
a:hover {color:#0081ff}
a:active {color:#0081ff}
HTML file that is loaded into the iFrame


<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>Untitled Document</title>

<link rel="stylesheet" type="text/css" href="emersonstylesheet.css" />

</head>
HTML that sets style


<model_text>
CKD5811
</model_text>
<br>
<content_text>
- Top-Loading Compact Disc Player<br>
- CD-R/RW Playback Compatible<br>
- Large 0.9&quot; Blue LED Display for All CD, Clock and Tuner Functions<br>
- Digital Tuning AM/FM Stereo Radio<br>
- Patented SmartSet&reg; Automatic Time Setting System<br>
- Dimensions: 11&quot; x 4.5&quot; x 8.25&quot;
</content_text>
How can I get it to work in Firefox and IE?

noTime
January 9th, 2007, 04:50 AM
Where did you get <model_text>, <content_text> and other tags? Do you know how things work in CSS?

XHTML:

<p class="model_text">Your stuff...</p>

CSS:

.model_text {
blah: blah;
}

In XHTML tags must be closed (not <br>, but <br />) and typed in lower-case (not <A> but <a>).

adstudio3d
January 9th, 2007, 11:12 AM
Actually, this is the first time i'm ever working with css... I've mostly done flash when I do web.
it is in HTML so the the <br> worked the way it should.

The <model_text>.....</model_text> worked fine in FF, just not in IE. It's fixed now though. Thanks. I just changed to <class="..."> way and it worked fine.

noTime
January 9th, 2007, 02:10 PM
There's a lot of stuff that works even if you don't do everything correctly but such ignorance may punish hardly.

Tags are really essential to your website so if you don't know what to use, try at least <span class="..."> instead of <class="..."> (your tag made me smile =)).