SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot Heinrich's Avatar
    Join Date
    Jan 2003
    Location
    Philadelphia
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Need help about my webpage

    I have problem with this page
    http://www.prospaathome.com/spabodytreatment.htm

    I designed it use macromedia dreamweaver mx 2004

    and It turns out ok in mozilla browser (just like i wanted)

    but when i open the webpage using internet explorer 6,
    the body text become centered.

    It's weird, anyone have explanation how to fix this?

    thanks,
    Heinrich

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Probably inheriting the <center> tag you have around the entire page; a deprecated method of centering anything.

    Anyway, add a "text-align: left" style to your table cell.

  3. #3
    SitePoint Zealot Heinrich's Avatar
    Join Date
    Jan 2003
    Location
    Philadelphia
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    yeah i have the tag <center> around the entire page.

    do you have idea to do it better?

    after i add the align tag, it works well, thanks

  4. #4
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,578
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Heinrich
    do you have idea to do it better?
    Apply text-align: center to the body element, assign left and right margins of "auto" to the table enclosing your page. That will center it with CSS.

    HTML Code:
    <html>
    <body style="text-align: center">
    <!-- Centered Table -->
    <table style="width: 760px; margin: 0px auto">
      <tr>
        <td>stuff</td>
      </tr>
    </table>
    </body>
    </html>

  5. #5
    SitePoint Zealot Heinrich's Avatar
    Join Date
    Jan 2003
    Location
    Philadelphia
    Posts
    149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thank you


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
  •