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

RE: [NH] CSS - Center a

Expand Messages
  • h.paulissen@facburfdcw.unimaas.nl
    Hi Mike, ... A short answer. One way to accomplish this is to set the leftmargin and rightmargin to a certain percentage... div{ margin-left: 10%;
    Message 1 of 1 , May 3, 2002
    • 0 Attachment
      Hi Mike,

      > Is there any way to horizontally center a <div> using CSS
      > positioning? I would like to center a large division in the middle of
      > the browser window so that it is always centered, even if a visitor's

      A short answer. One way to accomplish this is to set the leftmargin and
      rightmargin to a certain percentage...

      div{
      margin-left: 10%;
      margin-right: 10%;
      border: 1px solid black;
      }

      Positioning the other objects within the central div may be tricky....

      Hugo

      >
    Your message has been successfully submitted and would be delivered to recipients shortly.