IFrames w/ IE

A

Aeden Jameson

For some reason there is extraneous space at the bottom of the browser
when I try to view an svg file in an <iframe>. The problem occurs
when I specify relative or absolute positioning with a height over,
say, 50%. This seems to be a problem only in IE, works fine in
Mozilla. You guys have any ideas why this happens and what a cross-browser
fix would be? Here is the html file,

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>SVG in IFrame</title>
<style type="text/css">
html, body {
margin:0px;
padding:0px;
height:100%;
}

iframe#page {
position:relative;
height:60%;
border:1px solid black;
background-color:white;
}
</style>
</head>

<body>
<iframe id="page" src="index.svg" frameborder="0"
scrolling="no"/>
</body>
</html>

And the svg file is,

<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN"
"http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd"
<svg xml:space="preserve">
<text style="fill:red;" y="15">This is SVG.</text>
</svg>

Cheers,
Aeden
 
M

Mitja

Aeden Jameson said:
For some reason there is extraneous space at the bottom
of the browser when I try to view an svg file in an
<iframe>. The problem occurs
when I specify relative or absolute positioning with a
height over,
say, 50%. This seems to be a problem only in IE, works
fine in
Mozilla. You guys have any ideas why this happens and
what a cross-browser fix would be?

Not the faintest of ideas. You can try doing it with an <object> instead of
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top