That will center the contents within the div. However, the div auto-sizes to it's content unless you give it other style properties. You are assuming that your div is the full width of the browser window.

To do what you want, set two more styles on the div:
width: 100%;  /* Force the width to take up all possible space */
margin: 10px auto; /* Set the side margins to be equal and fill all possible space. */

You shouldn't need the <p> tags. They only confuse the matter since you're doing direct formatting.

-tim

On 4/21/2010 6:10 AM, Johann Spies wrote:
Can somebody explain to me why the following does not cause the
copyright notice to be centered?

       <div class="ez-box footer" style="text-align: center;">
         <p>
           Copyright Š 2009 -
           Powered by<a href="http://www.web2py.com";>web2py</a>
         </p>

       </div>

Regards
Johann



--
Subscription settings: http://groups.google.com/group/web2py/subscribe?hl=en

Reply via email to