Can't align Flowplayer video to the center, using HTML

by SonnyKing Banned
3 replies
  • WEB DESIGN
  • |
I'm trying to get this to the center of the page, but it remains in the left side.

The HTML I'm using is this:

HTML Code:
<a
 href="[path of URL]"
 style="display: block; width: 672px; height: 500px;" id="player"></a>
some where in there I put align: center;

Didn't do anything. Please help its a stupid little problem I been with for a couple of days now.

Thanks...
#align #center #flowplayer #html #video
  • Profile picture of the author Fernando Veloso
    Signature
    People make good money selling to the rich. But the rich got rich selling to the masses.
    {{ DiscussionBoard.errors[2252662].message }}
  • Profile picture of the author BobJutsu
    Naw, you don't want to "align: center", you want to use margins.

    First, you should be using a separate style sheet. Since you have given it an id, there is no reason not to...

    #player {
    height: 500px;
    width: 672px;
    display: block;
    margin: 0px auto;
    }

    setting the left and right margin to 'auto' is what sets the element in the center of the parent element.

    You could also use:

    position: relative;
    left: ***px;

    and either position it left or right until it is in the location that you want. Using margins is easier though, and it auto centers.
    {{ DiscussionBoard.errors[2253587].message }}
    • Profile picture of the author SonnyKing
      Banned
      Originally Posted by BobJutsu View Post

      Naw, you don't want to "align: center", you want to use margins.

      First, you should be using a separate style sheet. Since you have given it an id, there is no reason not to...

      #player {
      height: 500px;
      width: 672px;
      display: block;
      margin: 0px auto;
      }

      setting the left and right margin to 'auto' is what sets the element in the center of the parent element.

      You could also use:

      position: relative;
      left: ***px;

      and either position it left or right until it is in the location that you want. Using margins is easier though, and it auto centers.

      So Bob...

      How would that look, as far as the HTML itself?

      Give an example
      {{ DiscussionBoard.errors[2255375].message }}

Trending Topics