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

5933Re: [NH] Crediting a Photograph

Expand Messages
  • Axel Berger
    Mar 26, 2007
      Greg Chapman wrote:
      > So, disregard the particular example for a moment and just
      > answer, how one would use a <DIV> to align to a fixed width
      > object that remains centered within the window.

      You can use text-align with IMG inside the DIV. To get what you want you
      may need to set the width of the text underneath the image or the DIV as
      a whole manually, tables do it for you.
      Alternatively centering DIVs is meant to be done by setting both
      margin-left and margin-right to auto. As browser support varies you
      ought to use all three, i.e. both margins plus text-align:center. A
      downside is that this also centres text inside the DIV, so you may need
      to use an extra inner content DIV and set its text-align to something
      else.

      N.B: My source here is "integrated HTML and CSS" by Virginia deBolt -
      recommended

      Axel
    • Show all 18 messages in this topic