Alan,

Yes, tried that early-on. The following code does not center the image in 
the iframe:


<a title="picture" href="images/Picture%20391b.jpg" target="_image">
<img alt="picture" src="images/Picture%20391b_small.jpg" width="113"
height="80" /></a>

<div class="center">
 <iframe frameborder="0" scrolling="auto" name="_image">
     <p class="norm100" style="text-align:center">Sorry, this photo cannot
be displayed.
     Your browser does not support inline frames.</p>
 </iframe>
</div>

This works, sort of, in Firefox 3.5.5 by showing the image de-zoomed to fit
in the iframe. However, clicking the image zooms and centers it in the
iframe. I don't know whether that is just a Firefox feature or that the code
is working.  This does not center the image in IE 7.0, Google Chrome 3.0,
Safari 4.0.3, or Opera 10.01.

I also tried removing the other iframe parameters but there was no change.
The image just pastes in at scroll position (0,0). So, I just moved on and
wrote the javascript.

Michael


> Michael, did you try my correction which is a CSS option.
>
> .center {text-align:center}
>
> <div class="center"><iframe></iframe></div>
>
>
> Since an iframe is an inline element you use the same method as with other 
> inline elements (a, img) for centering. This is by placing them in a block 
> element, div and centering them in the block by using text-align.
>
> All three options I have given were tested and work in Firefox (gecko 
> 1.9).
>
>
>
> -- 
> Alan http://css-class.com/
>
> Armies Cannot Stop An Idea Whose Time Has Come. - Victor Hugo
>


______________________________________________________________________
css-discuss [cs...@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to