0

I have two html files.

FirefoxBug.html

<html>
<body>
<div style=background-color:red;>
<iframe src="/iframe.html"></iframe>
</div>
</body>
</html>

And iframe.html

<html>
<body style=background-color:blue;>
<div>
<p>This backgroud should change</p>
</div>
</body>
</html>

I have these two files in the same folder on my desktop, and I am not sure why the iframe will not load.

Is a DTD type required for iframes to work?

Thanks, sj

1
Contributor
1
Reply
3
Views
11 Years
Discussion Span
Last Post by Sailor_Jerry
0

Got it working.

<?xml version="1.0"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<style>
div{background-color:red; padding:5em;}
</style>
</head>

<body>
<div>
<iframe src="iframe.html" ></iframe>
</div>
</body>
</html>

and iframe.html

<?xml version="1.0"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; 
charset=ISO-8859-1"/>
</head>
<body>
<div>test iframe</div>
</body>
</html>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.