Loading ...
Sorry, an error occurred while loading the content.

5940Re: [NH] Crediting a Photograph

Expand Messages
  • loro
    Mar 26, 2007
    • 0 Attachment
      Axel Berger wrote:
      >loro wrote:
      > > Add 'margin-right: auto; margin-left: auto' for the div
      > > (that already has a width).
      > > <http://css-discuss.incutio.com/?page=CenteringBlockElement>
      >
      >Yes, that is the correct way. Unfortunately it seems not to be reliably
      >supportet by many browsers.

      Not many. Old. The only one of significance is IE version 5.x and older.
      IE6 needs to be in Standards Mode IIRC. The workaround for old IE is simple
      enough. Use 'text-align: center on a containing element.

      body { text-align: center }
      #box { text-align: left;
      width: 500px; height: 100px;
      color: black; background: red;
      margin: auto }


      <div id="box></div>

      Lotta
    • Show all 18 messages in this topic