by-expession

Expression Web Resources

EXERCISE 5-2

Latest post 12-11-2007 12:45 PM by cdwise. 1 replies.
  • 10-29-2007 4:52 PM

    EXERCISE 5-2

    Hi, Exercise 5-2 itself makes sense, but just have a quick question about how the page is displayed.

    On P122 of the book, it says that left is the default alignment for all elements.

    Why then, in the exercise does the div appear centred, I would expect it to be 22em wide but aligned to the left. 

    I see that the margin-left and margin-right properties are set to auto, which on researching I found out means that the browser will set the left and right margin.  But why does the browser choose to centre everything?

    TIA - Chris

  • 12-11-2007 12:45 PM In reply to

    • cdwise
    • Top 10 Contributor
    • Joined on 12-22-2006
    • Houston, TX
    • Posts 532

    Re: EXERCISE 5-2

    Chris,

    Sony, I missed this post. Margin auto takes whatever space there is and divides it equally. Why this was decided as how to center a block with a known width I have no idea. It does not change the texts alignment.

    Cheryl D Wise MS MVP Expression Instructor: starttoweb.com

    Filed under:
Page 1 of 1 (2 items) | RSS
Powered by Community Server (Commercial Edition), by Telligent Systems Sponsored by: Start to Web
@ 2005-2008 Cheryl D Wise