
Originally Posted by
boogyman
or assign it relatively and use a z-index thats greater than the iframe... allowing it to be compliant and user friendly.
Code:
img#yada {
position: relative;
top: 20px;
left: 10px;
z-index: 5;
}
Code:
<div>
<img id="yada" src="" width="" height="" alt="">
<iframe>
<noscript>Your browser doesn't support this feature, please upgrade to a newer version to see the full features of this website</noscript>
</iframe>
</div>
That code doesn't look exactly compliant to me, but I'm not sure. The noscript tag certainly isn't necessary, and being block level probably shouldn't be inside an inline element like an iframe. Plain text there should be fine.
Now, with relative position vs. absolute position, neither is more compliant than the other. However, relative position still takes up its alloted space in the layout. In this case this would 'push' the iframe over or down, creating a gap of some sort.
I'd do it like so (style in the head):
Code:
<style type="text/css">
<!--
#container {
position:relative;
}
#yada {
position: absolute;
top: 0;
left: 0;
z-index: 5;
}
#daframe {
position:relative;
}
-->
</style>
Markup in the body:
Code:
<div id="container">
<img id="yada" src="" width="" height="" alt="">
<iframe id="daframe">
Your browser doesn't support iframes, please upgrade to a newer version to see the full features of this website
</iframe>
</div>
Bookmarks