Link to home
Start Free TrialLog in
Avatar of aej1973
aej1973

asked on

align HTML table in chrome...

Hi, I am using the following script to align my table and it does not seem to work in Chrome, it works in FF. Can someone let me know what I can do to have it work in chrome?

div#wrapper {
        display:table;
        position:static;
        margin-top: 60px;
        left:60px;
        }


<body>
<div id="wrapper">
<table width="70%" border="0" cellspacing="4" cellpadding="4" class="table">
  <tr class="heading">
    ......


What I am trying to achieve is to have my table positioned 60px from the left side.

Thank you
Avatar of COBOLdinosaur
COBOLdinosaur
Flag of Canada image

You should be using position:relative instead of position:static

Cd&
Avatar of aej1973
aej1973

ASKER

Tried that but it did now work;

div#wrapper {
        display:table;
        position:relative;
        margin-top: 60px;
        padding-left:60px;
        }
Then post a link to the page so I can see what is going on. A fragment of code does not tell me much.

Cd&
Avatar of aej1973

ASKER

Hi cd, I have attached my html file and my css file, thank you.

A
InvStyle.css
home.txt
Well the code is pretty much worthless.  The CSS does not validate using http://jigsaw.w3.org/css-validator/

The HTML is a disaster.  It is no where near being well formed and valid.  It contains multiple doctype and html tags and is junk based on the results from http://validator.w3.org/

It is a wonder the browser displays anything more than a blank page.  There is no sense in trying to solve a rendering problem when the code is so defective.  So the forst thing you need to do is use the validators to get something that resembles valid code, then if there is still a problem it will be solvable.

Cd&
Avatar of Gary
Did you join 3 pages together?

Works fine for me in Chrome, though you do have your body margin which you can get rid of with
body {
margin:0;
padding:0;
}

http://jsfiddle.net/g5XpU/
Avatar of aej1973

ASKER

I guess, I should have stripped out the header, there were two pages joined together. Attached is a screen shot of the page. All I am trying to do is to move the table left, 60px from the left edge, thanks.

A
home.png
Attach your real html code.
Avatar of aej1973

ASKER

I apologize regarding my previous attachment, I had copied the source code from view source and I guess it had a lot of unnecessary information.
 
<?php
include 'header_main.php';
include 'footer.html';
?>
<html>
<head>
<link rel="stylesheet" type="text/css" href="css/InvStyle.css" />
</head>
<body> 
<div id="wrapper">   
<table width="70%" border="0" cellspacing="4" cellpadding="4" class="table">
  <tr class="heading">
    <th colspan="3">System Information</th>
  </tr>
  <tr>
    <th class="homePage">Total Extensions</th>
    <th class="homePage">Join Date</th>
    <th class="homePage">Registered Phones Lines</th>
  </tr>
  <tr>
    <td class="homePageInfo"><?=$count?></td>
    <td class="homePageInfo"><?=$joinDate?></td>
    <td class="homePageInfo"><?=$rowCount?></td>
  </tr>
  <tr>
    <th class="homePage">Last Login date/time</th>
    <th class="homePage">Last Login IP</th>
    <th class="homePage">Current IP</th>   
  </tr>
  <tr>
   <td class="homePageInfo3"><?=$lastDt?></td>
    <td class="homePageInfo3"><?=$lastIp?></td>
    <td class="homePageInfo3"><?=$ipaddress?></td>
  </tr>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
  <tr>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
    <td>&nbsp;</td>
  </tr>
</table>
     </div>
   </body>
</html>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of aej1973

ASKER

Chrome? It worked for me in FF.
Avatar of aej1973

ASKER

well I checked, jsfiddle in Chrome too and it worked. Thank you.
Does the fiddle work in Chrome? It does for me - 60px from the left even as you resize the window.
View the source of your page in Chrome and attach the code here or better still give a link if it is online.
Avatar of aej1973

ASKER

Thank you.