How do I center a transparent box?

How do I center a transparent box?

Assuming the box is a block element, the same as you would any other block element, using auto margins.

.box {
    display: block;  /* This may be the case by default */
    background: transparent; /* This will be the case by default */
    max-width: 500px;
    margin: 0 auto;
}

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.