Re: Another question Can't center image or video...

Discussion in 'HTML' started by Gus Richter, Mar 3, 2012.

  1. Gus Richter

    Gus Richter Guest

    On 3/2/2012 11:01 PM, Mr Bean wrote:
    >
    > http://www.proroctwa.com/ziemski-avatar.htm
    > Nothing so far could center that video, or images on other example.
    > Tried
    > margin: 0 auto:
    > in many situation.
    > Tried even <div align="center">
    > Nothing works!
    > Help please....



    You have an extra closing curly brace which prevents your second rule
    from being seen.
    Remove the extra "}" and it will work.

    <style type="text/css">
    #header {background:url(images/Proroctwa2.jpg) no-repeat;height:250px;
    width: 990px; margin:0 auto; padding:0;}
    }
    ..style5 {
    text-align: center;
    }
    </style>

    --
    Gus
     
    Gus Richter, Mar 3, 2012
    #1
    1. Advertising

  2. Gus Richter

    Tim Streater Guest

    In article <jisjmf$7ud$>,
    Gus Richter <> wrote:

    > On 3/2/2012 11:01 PM, Mr Bean wrote:
    > >
    > > http://www.proroctwa.com/ziemski-avatar.htm
    > > Nothing so far could center that video, or images on other example.
    > > Tried
    > > margin: 0 auto:
    > > in many situation.
    > > Tried even <div align="center">
    > > Nothing works!
    > > Help please....

    >
    >
    > You have an extra closing curly brace which prevents your second rule
    > from being seen.
    > Remove the extra "}" and it will work.
    >
    > <style type="text/css">
    > #header {background:url(images/Proroctwa2.jpg) no-repeat;height:250px;
    > width: 990px; margin:0 auto; padding:0;}
    > }
    > .style5 {
    > text-align: center;
    > }
    > </style>


    This is a good argument for aligning all braces thus:

    #header
    {
    background: ....
    ...
    }

    ..style5
    {
    text- ...
    }

    Then its obvious that they match.

    --
    Tim

    "That excessive bail ought not to be required, nor excessive fines imposed,
    nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
     
    Tim Streater, Mar 3, 2012
    #2
    1. Advertising

  3. Gus Richter

    dorayme Guest

    In article <>,
    Tim Streater <> wrote:

    > good argument for aligning all braces thus:
    >
    > #header
    > {
    > background: ....
    > ...
    > }
    >
    > .style5
    > {
    > text- ...
    > }
    >
    > Then its obvious that they match.


    Not sure if this is standard or I put it there ages back but my BBEdit
    has a useful menu item under Markup/CSS/Format, doing it thus:

    #header
    {
    background: red;
    color: white;
    }

    But for where there is just one style, the compact

    .style5 { text-align: center; }

    is done.

    Perhaps yours is neater though. Me, I like everything jammed up left:

    #header {
    background: red;
    color: white;
    }

    And for singles:

    ..style5 {text-align: center;}

    and if I have been slack or there is a lot, I use the BBEdit format
    menu.


    Not as neat or intuitive as yours or BBEdit's, just easier to type.

    On a Mac, it is fine to have the curlies bang up to the style but it
    is a big nuisance on Win machines, the space being very useful then.

    --
    dorayme
     
    dorayme, Mar 3, 2012
    #3
    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. Replies:
    3
    Views:
    483
    Travis Newbury
    Feb 8, 2006
  2. wallge
    Replies:
    8
    Views:
    712
    wallge
    Jan 12, 2007
  3. The Starmaker

    center video in bg image

    The Starmaker, Jan 2, 2007, in forum: HTML
    Replies:
    8
    Views:
    480
    The Starmaker
    Jan 15, 2007
  4. David Buckley

    req converting video to flash video examples

    David Buckley, Apr 22, 2008, in forum: ASP .Net
    Replies:
    1
    Views:
    352
    Peter Bromberg [C# MVP]
    Apr 22, 2008
  5. AAaron123
    Replies:
    1
    Views:
    835
    AAaron123
    Mar 11, 2009
Loading...

Share This Page