Q: Centering flash on page

Discussion in 'HTML' started by martin weinberger, Sep 26, 2003.

  1. Hi All,

    I'm not that familiar with HTML coding yet. I have a flash image that I am
    showing in an HTML page. The flash displays fine, but displays in the upper
    righthand corner. What would I have to add to center the flash image in the
    browser window? I've copied the source below.

    <html>
    <head>
    <title>Macromedia Flash (SWF) Movie Created by Camtasia Studio</title>
    </head>
    <body bgcolor="#FFFFFF">
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.ca
    b#version=5,0,0,0" width="510" height="407" id="myMovieName">
    <param name="movie"
    value="Introduction_controller.swf?csConfigFile=Introduction_config.xml">
    <param name="quality" value="high">
    <param name="bgcolor" value="#FFFFFF">
    <param name="FlashVars" value="csConfigFile=Introduction_config.xml">
    <embed
    src="Introduction_controller.swf?csConfigFile=Introduction_config.xml"
    FlashVars="csConfigFile=Introduction_config.xml" quality=high
    bgcolor=#FFFFFF width=510 height=407 type="application/x-shockwave-flash"
    pluginspace="http://www.macromedia.com/go/getflashplayer">
    </embed>
    </object>
    </body>
    </html>

    Thanks in advance.

    --
    Martin A. Weinberger
    ButterflyVista
    http://www.butterflyvista.com/
    (when responding to me by email, remove the "X_" from the beginning)
    martin weinberger, Sep 26, 2003
    #1
    1. Advertising

  2. martin weinberger

    Talc Ta Matt Guest

    Here's the Tables version of it below. It'll work fine. Does anyone know how to
    reproduce the equivalent of HTML's valign=middle tag in CSS for a DIV?


    <TABLE width=100% height=100%><TR><TD align=center>

    WHATEVER GOES HERE

    </TD></TR></TABLE>
    Talc Ta Matt, Sep 27, 2003
    #2
    1. Advertising

  3. martin weinberger

    Kris Guest

    In article <>,
    (Talc Ta Matt) wrote:

    > Here's the Tables version of it below. It'll work fine. Does anyone know how
    > to
    > reproduce the equivalent of HTML's valign=middle tag in CSS for a DIV?
    >
    >
    > <TABLE width=100% height=100%><TR><TD align=center>
    >
    > WHATEVER GOES HERE
    >
    > </TD></TR></TABLE>
    >
    >


    <http://www.google.nl/search?q=vertical+centering+css>

    --
    Kris
    erlands (nl)
    "We called him Tortoise because he taught us" said the Mock Turtle.
    Kris, Sep 27, 2003
    #3
  4. Talc Ta Matt wrote:

    > Does anyone know how to
    > reproduce the equivalent of HTML's valign=middle tag in CSS for a DIV?


    div {
    height: WHATEVER;
    margin-top: auto;
    margin-bottom: auto;
    }

    The div will expand vertically to fit whichever container it is in,
    centring the content.

    Probably doesn't work in IE5/Win or quirks mode of IE6/Win.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?id=132
    Toby A Inkster, Sep 27, 2003
    #4
  5. "Talc Ta Matt" <> wrote in message
    news:...
    > Here's the Tables version of it below. It'll work fine. Does anyone know

    how to
    > reproduce the equivalent of HTML's valign=middle tag in CSS for a DIV?
    >
    >
    > <TABLE width=100% height=100%><TR><TD align=center>
    >
    > WHATEVER GOES HERE
    >
    > </TD></TR></TABLE>
    >
    >


    Fitst "It'll work fine" is a lie.
    "Height" is an invalid attribute of <table> and will NOT "work fine" in any
    browser when a proper DTD is supplied.


    --
    Karl Core

    Charles Sweeney says my sig is fine as it is.
    EightNineThree, Sep 27, 2003
    #5
  6. martin weinberger

    Talc Ta Matt Guest

    >Fitst "It'll work fine" is a lie.
    >"Height" is an invalid attribute of <table> and will NOT "work fine" in any
    >browser when a proper DTD is supplied.


    Please give an example of when this doesn't work. I've yet to see it.
    Talc Ta Matt, Sep 29, 2003
    #6
  7. martin weinberger

    rf Guest

    "Talc Ta Matt" <> wrote in message
    news:...
    > >Fitst "It'll work fine" is a lie.
    > >"Height" is an invalid attribute of <table> and will NOT "work fine" in

    any
    > >browser when a proper DTD is supplied.

    >
    > Please give an example of when this doesn't work. I've yet to see it.


    The following "works" with IE, Mozilla and Opera:

    <html>
    <head>
    </head>
    <body>
    <table height="100%" bgcolor="#00ffff">
    <tr>
    <td>
    text
    </td>
    </tr>
    </table>
    </body>
    </html>

    The following causes the height to be (correctly) ignored in IE5 and Mozilla

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
    <html>
    <head>
    </head>
    <body>
    <table height="100%" bgcolor="#00ffff">
    <tr>
    <td>
    text
    </td>
    </tr>
    </table>
    </body>
    </html>

    Note the qualification: "when a proper DTD is supplied".

    Cheers
    Richard.
    rf, Sep 29, 2003
    #7
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Bernie
    Replies:
    0
    Views:
    543
    Bernie
    Sep 5, 2004
  2. Richard

    Re: Centering image on page?

    Richard, Jun 25, 2003, in forum: HTML
    Replies:
    0
    Views:
    3,753
    Richard
    Jun 25, 2003
  3. Jerry Muelver

    Re: Centering image on page?

    Jerry Muelver, Jun 25, 2003, in forum: HTML
    Replies:
    0
    Views:
    831
    Jerry Muelver
    Jun 25, 2003
  4. Jim Higson
    Replies:
    1
    Views:
    509
    Jim Higson
    Sep 21, 2004
  5. Replies:
    8
    Views:
    23,498
    SABOND21
    Feb 9, 2012
Loading...

Share This Page