W3C home > Mailing lists > Public > www-amaya@w3.org > April to June 2003

centering issues

From: John Russell <ve3ll@cogeco.ca>
Date: Thu, 24 Apr 2003 17:45:46 -0400
To: www-amaya@w3.org
Message-ID: <3EA822CA.32571.2C3EDD@localhost>
Centering tables is still a problem with Amaya and style.
My short demo file has two tables, each bracketted with 
a div element.  The style rule for the div elemnt has both
text-align:center and margin:auto  to hedge bets -- either 
should do the job.  But the second one does not center.
The first DOES center because i have placed the old 
align=center attribute on the div .....   this is a workaround
and demonstrates that the rendering engine of amaya has the
capacity to center a dived table correctly.   But there is a
breakdown in the style property settings to rendering  that 
disables style centering of tables ....   headings and paragraphs
are centered ok inside divs   BUT NOT TABLES ....  This 
makes a lot of pages look bad and i havent been able to
construct a centered table in a new doc yet..... --
 

John Russell, VE3LL@RAC.CA
http://home.cogeco.ca/~ve3ll (2 L's as in LLAMA)
check HTML at http://www.htmlhelp.com/tools/validator/
check CSS at http://jigsaw.w3.org/css-validator/
check JavaScript at http://www.crockford.com/javascript/jslint.html




<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>Centertab.htm</title>
<style type="text/css">
div {text-align: center; margin:auto}
</style></head><body>

<div align="center">
<table summary="*" border="1">
<caption>Table centered with attribute</caption>
<tr>
   <th>Person</th>
   <th>Trait</th></tr>
<tr>
   <td>Xxxx</td>
   <td>Flakey</td></tr>
<tr>
   <td>Yyyy</td>
   <td>Obnoxius</td></tr>
<tr>
   <td>Zzzz</td>
   <td>Anal</td></tr>
</table></div>

<div>
<table summary="*" border="1">
<caption>Table should center using style</caption>
<tr>
   <th>Person</th>
   <th>Trait</th></tr>
<tr>
   <td>Amy</td>
   <td>Flakey</td></tr>
<tr>
   <td>Bob</td>
   <td>Obnoxius</td></tr>
<tr>
   <td>Charlie</td>
   <td>Anal</td></tr>
</table></div>
</body></html>
Received on Thursday, 24 April 2003 17:45:51 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:53:27 UTC