Results 1 to 2 of 2

Thread: IE 7 centers my text

  1. #1
    Join Date
    May 2007
    Posts
    2

    IE 7 centers my text

    I have just built an html website using tables and a attached css style sheet using Dreamweaver 8.

    The text in the tables is aligned to the left and the whole webpage is centered in the browser using the div tag.

    When I open the web page in Firefox it works fine i.e: it centers the web page and aligns the table text to the left.

    But in IE7 it's a different kettle of fish as it centers the web page but then centers the text in the table.

    I have tried removing the DIV tag and changing attributes in the css file but nothing seems to work.

    Any ideas?

  2. #2
    Join Date
    Feb 2006
    Location
    Salisbury UK
    Posts
    4,332
    Try <table style="width: 750px; margin: auto; text-align: left">.......</table>
    if your table is not in a containing div

    or if your table is inside a div tag this may also work:-

    <div style="width: 750px; margin: auto; text-align: left;">
    <table>......</table>
    </div>

    or
    <div style="width: 750px; margin: auto;">
    <table style="text-align: left;">......</table>
    </div>

    The div with a fixed width with margin: auto will centralise on the page but the text should align to the left.

    You may have to delete any other alignments like align="left" and align="center" in case they co***ict. Without seeing your code I can't be sure what will work.
    Code downloaded to my PC will be deleted in due course.
    WIN7; IE9, Firefox, Opera, Chrome and Safari for Windows; screen resolution usually 1366*768.
    Also IE6 on W98 with 800*600 and IE8 on Vista 1440*900.

Similar Threads

  1. Need table help
    By BigD86 in forum Web Design, HTML Reference and CSS
    Replies: 1
    Last Post: 18 May 2006, 01:08 AM

Posting Permissions

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