+ Reply to Thread
Results 1 to 5 of 5

Thread: Centering a flash animation in a .html file?

  1. #1
    Join Date
    Sep 2008
    Posts
    1

    Question Centering a flash animation in a .html file?

    I've made an 800x600 website entirely in flash and now wish to embed it within an html page using Dreamweaver. I've actually already embedded it, but I'm wondering how I can centre it in the middle of the screen? It looks pretty bad if it just sits on the upper-left of the page. Ideally, I'd like to know how to make it sit in the centre of the screen according to the size of the window (which may depend on the resolution of the screen).

  2. #2
    Join Date
    Sep 2008
    Posts
    141

    Default

    Quote Originally Posted by BobFrank View Post
    I've made an 800x600 website entirely in flash and now wish to embed it within an html page using Dreamweaver. I've actually already embedded it, but I'm wondering how I can centre it in the middle of the screen? It looks pretty bad if it just sits on the upper-left of the page. Ideally, I'd like to know how to make it sit in the centre of the screen according to the size of the window (which may depend on the resolution of the screen).
    This might not be the 'proper' way to center the flash object. I'd simply add a <center> before the flash object.

  3. #3
    Early Out's Avatar
    Early Out is offline Former Moderator, Still Respected
    Join Date
    Mar 2006
    Location
    Sector R
    Posts
    4,650

    Default

    Quote Originally Posted by mhJr_ View Post
    I'd simply add a <center> before the flash object.
    ... and a </center> after it! Yeah, if you're not trying to make a page that will validate with XHTML 1.0 STRICT, for example, sometimes the old deprecated tags are the easiest way to go. Over the long haul, browsers may stop honoring them, but there's no sign of that happening any time soon.

  4. #4
    Join Date
    Nov 2006
    Location
    Sydney, Australia
    Posts
    4,533

    Default

    The idea is supposed to be to separate the appearance of the page from the content so that you can define different appearance for different media - center makes no sense to web readers for example.

    The way that you should center something using CSS is to set its left and right margins to auto.

    <object style="margin: 0 auto" ....

  5. #5
    Join Date
    Sep 2008
    Posts
    141

    Default

    Ah, Felgall is right.

+ Reply to Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts