iframe - content position issue with IE

Hello,

I’m playing a bit with iframes for a future planned project. So far, the iframe should contain the output of a CGI script (currently just a simple text line, later something more complex).

At TOBIAS EICHNER IT + CONSULTING - Information Technology Is Our Universe ! there is a sample test page I wrote. In any webbrowser this page has been previewed (latest versions of Firefox, Opera, Safari), the content is placed correctly more or less in the middle of the box.

However on latest IE the text position differs. It also differs slightly in Opera, but the opposite way (which would be acceptable).

I wonder if there is a way to center contents within an iframe explicitly ? Maybe there is an IE-specific trick ?

Tobias.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

An iframe doesn’t have any positioning qualities about it, but the
content you place inside it may. (An iframe is like a browser window
that you can place within a page.) Try making a single-cell table,
100% height and 100% width, set that single cell to valign=middle, and
then place your content within that cell inside a P tag that has its
text-align set to center.

Walter

On Dec 22, 2009, at 3:25 PM, tobiaseichner wrote:

I wonder if there is a way to center contents within an iframe
explicitly ? Maybe there is an IE-specific trick ?


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

Thank you for your hints :slight_smile:
I’ll give it a try by creating a more complex script.

Tobias.


freewaytalk mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options