Cannot centre page in firefox browser ( it works in Internet Explorer)

Discussion in 'HTML' started by Bundy, Nov 19, 2006.

  1. Bundy

    Bundy Guest


    I cannot centre the following page in firefox browser. It does work in
    internet explorer.

    CSS (in external file - testcssglobal.css)

    body {
    text-align: center;
    margin: 0px;
    padding: 0px;


    #global {
    position: relative;
    width: 800px;
    text-align: left;

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    <html xmlns="">
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>testing css</title>
    <link href="css/testcssglobal.css" rel="stylesheet" type="text/css" />

    <div id="global">
    <table width="800" border="10">


    Your help will be appreciated.


    Bundy, Nov 19, 2006
    1. Advertisements

  2. Bundy

    dorayme Guest

    Try instead of all the above:

    body {margin:0;padding:0;}

    table {margin:auto;}

    (given your html... thought better to put the styles for the
    table in the css...)
    dorayme, Nov 20, 2006
    1. Advertisements

  3. Bundy

    dorayme Guest

    should read "though better"
    dorayme, Nov 20, 2006
  4. Bundy

    Bundy Guest


    Thank you

    Bundy, Nov 20, 2006
  5. Bundy

    dorayme Guest

    I am glad to have helped. Any other problems?
    dorayme, Nov 20, 2006
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.