SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast
    Join Date
    Dec 2002
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    aligning div to center - horizontally

    hi!

    i am aware that there is another thread that has to do with aligning a

    div.....yet i could find an answer to the specific problem...so i am asking again...

    i have used this code

    body {
    width: 620px;
    text-align:center;
    margin: auto;
    }

    and it works under IE and Mozilla...I have also changed the text-align (due to inherit) to divs-content of the page....

    i know though that by removing the text-align attribute IE will fail to horizontally center the page's content, whereas Mozilla has no such problem..

    how can it be done without the text-align? i have read it is due to a bug that actually causes the content of the page to be centered....

    Thanl u in advance....

  2. #2
    SitePoint Guru dale_burrell's Avatar
    Join Date
    Aug 2002
    Location
    Wellington, New Zealand
    Posts
    861
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Its all here
    If you aren't living life on the edge
    - you're taking up too much space
    Creative Dreaming Ltd / Ask The Local / Amanzi Travel


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •