Ver Mensaje Individual
  #5 (permalink)  
Antiguo 12/12/2009, 04:09
Avatar de neodani
neodani
 
Fecha de Ingreso: marzo-2007
Mensajes: 1.811
Antigüedad: 17 años, 1 mes
Puntos: 20
Respuesta: No consigo centrar estas tablas

Cita:
Iniciado por jomaruro Ver Mensaje
Hola:

Añade al principio del css esto:

Código:
* {
	margin:0 auto;
        margin-right:auto;
}
Y después modifica esto:

#center{
margin:0 auto;
width:1190px;
overflow:auto;
border:1px dashed #ff0000;
}

Saludos.

Muchas gracias jomaru, pude arreglar todo con lo que me dijiste

Aquí el código completo, con las modificaciones que hice.

Código HTML:
Ver original
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
  2. <title>Tiempos Pectra</title>
  3. <style type="text/css">
  4.  
  5. * {
  6.     margin:0 auto;
  7.     margin-right:auto;
  8.    
  9. }
  10. body{
  11.     text-align:center;
  12.     margin-top:10px;
  13. }
  14. table, th, td {
  15.     border: 1px solid #D4E0EE;
  16.     border-collapse: collapse;
  17.     font-family: "Trebuchet MS", Arial, sans-serif;
  18.     color: #555;
  19. }
  20.  
  21. h2,h4 {
  22.     font-family: "Trebuchet MS", Arial, sans-serif;
  23.     color: #555;
  24. }
  25.  
  26. caption {
  27.     font-size: 150%;
  28.     font-weight: bold;
  29.     margin: 5px;
  30. }
  31.  
  32. td, th {
  33.     padding: 7px;
  34. }
  35.  
  36. thead th {
  37.     text-align: center;
  38.     background: #E6EDF5;
  39.     color: #4F76A3;
  40.     font-size: 100% !important;
  41. }
  42.  
  43.  
  44. tbody th {
  45.     font-weight: bold;
  46. }
  47.  
  48. tbody tr { background: #FCFDFE; }
  49.  
  50. tbody tr.odd { background: #F7F9FC; }
  51.  
  52. table a:link {
  53.     color: #718ABE;
  54.     text-decoration: none;
  55. }
  56.  
  57. table a:visited {
  58.     color: #718ABE;
  59.     text-decoration: none;
  60. }
  61.  
  62. table a:hover {
  63.     color: #718ABE;
  64.     text-decoration: underline !important;
  65. }
  66.  
  67. tfoot th, tfoot td {
  68.     font-size: 85%;
  69. }
  70. .verde thead th{
  71.     background: #CEEF9C;
  72.     color:#59B74F;
  73.     padding: 7px;
  74.     border: 1px solid #CEEF9C;
  75. }
  76. .verde td {
  77.     border: 1px solid #CEEF9C;
  78. }
  79.  
  80. .right{
  81.     float:right;
  82. }
  83. .left{
  84.     float:left;
  85. }
  86. .both{
  87.     clear:both;
  88. }
  89. .empleados{
  90.     float:right;
  91.     margin-right:90px;
  92.     margin-bottom:-30px;
  93.     padding-top:20px;
  94. }
  95.  
  96. .titulo1 {
  97.     text-align: center;
  98.     color: #4F76A3;
  99.     font-size: 100% !important;
  100.     padding: 2px;
  101.     font-weight: bold;
  102.     border: 0px solid #D4E0EE;
  103.     border-collapse: collapse;
  104.     font-family: "Trebuchet MS", Arial, sans-serif;
  105.     color: #555;
  106.     width:364px;
  107.     margin:0px;
  108. }
  109. .resumenanterior{
  110.     float:left;
  111.     margin-left:20px;
  112. }
  113. .resumenhoy{
  114.     float:left;
  115.     margin-left:20px;
  116. }
  117. .resumenmes{
  118.     float:left;
  119.     margin-left:20px;
  120. }
  121. .resumenhoy td, .resumenmes td, .resumenanterior td, .tiempo td{
  122.     text-align:center;
  123. }
  124. .incidencias{
  125.     margin-bottom:30px;
  126. }
  127. .center{
  128.     margin:0 auto;
  129.     width:1190px;
  130.     overflow:auto;
  131.     margin-top:20px;
  132. }
  133. .footer{
  134.     font-family: "Trebuchet MS", Arial, sans-serif;
  135.     font-size: 13px;
  136.     color:#555;
  137. }
  138.  
  139. <script type="text/javascript">
  140. function abreSitio(){
  141. var URL = "http://";
  142. var web = document.form1.empleados.options[document.form1.empleados.selectedIndex].value;
  143. window.open(URL+web, '_self', '');
  144. }
  145. </head>
  146.  
  147.  
  148. <h2>Tiempos Empleado1</h2>
  149. <h4>Fecha: 10/12/2009</h4>
  150.  
  151. <div class="empleados">
  152.     <form name="form1" action="#" target="_blank">
  153.     <select name="empleados">
  154.     <option>» Selecciona Empleado «</option>
  155.     <option value="#">Empleado1</option>
  156.     <option value="#">Empleado2</option>
  157.     <option value="#">Empleado3</option>
  158.     <option value="#">Empleado4</option>
  159.     <option value="#">Empleado5</option>
  160.     </select>
  161.     <input type="button" value="Ir" onClick="javascript:abreSitio()"/>
  162.     </form>
  163. </div>
  164.  
  165. <div class="center">
  166. <div class="tiempo">
  167.     <table><thead>
  168.     <tr><th title="Minutos que anotamos en las Aperturas de Incidencias">Tiempo Aperturas</th><th title="Minutos de Aperturas MAS tiempo de los Comentarios de Pectra">Tiempo Total</th></tr></thead>
  169.     <tr><td>50</td><td>385</td></tr></table>
  170. </div>
  171. </div>
  172.  
  173. <div class="both"/>
  174. <div class="center">
  175. <div class="resumenanterior">
  176.     <p class="titulo1">Mes Anterior - NOVIEMBRE</p>
  177.     <table><thead><tr><th>Abiertas</th><th title="Botón Solucionar Incidencia">Solucionadas</th><th title="Botón Finalizar Incidencia">Cierre Administrativo</th></tr></thead>
  178.     <tr><td>17</td><td>23</td><td>26</td></tr></table>
  179. </div>
  180.  
  181. <div class="resumenhoy">
  182.     <p class="titulo1">HOY</p>
  183.     <table class="verde"><thead><tr><th>Abiertas</th><th title="Botón Solucionar Incidencia">Solucionadas</th><th title="Botón Finalizar Incidencia">Cierre Administrativo</th></tr></thead>
  184.     <tr><td>17</td><td>23</td><td>26</td></tr></table>
  185. </div>
  186.  
  187. <div class="resumenmes">
  188.     <p class="titulo1">Mes Actual - DICIEMBRE</p>
  189.     <table><thead><tr><th>Abiertas</th><th title="Botón Solucionar Incidencia">Solucionadas</th><th title="Botón Finalizar Incidencia">Cierre Administrativo</th></tr></thead>
  190.     <tr><td>17</td><td>23</td><td>26</td></tr></table>
  191. </div>
  192. </div>
  193. <div class="both"/>
  194. <br/>
  195. <br/>
  196.  
  197. <div class="incidencias">
  198. <table><thead><tr><th>ID_Comentari</th><th>ID_Incidencia</th><th>Data</th><th>Descripcio</th><th>Temps Dedicat</th><th>Creat Per</th></tr></thead>
  199. <tr><td>69002</td><td>22161</td><td>10/12/2009 9:53:57</td><td><p>aaaaaaaaaaa</p></td><td>120</td><td>12571</td></tr>
  200. <tr><td>69002</td><td>22161</td><td>10/12/2009 9:53:57</td><td><p>bbbbbbbbbbbb</p></td><td>120</td><td>12571</td></tr>
  201. <tr><td>69002</td><td>22161</td><td>10/12/2009 9:53:57</td><td><p>cccccccccccc</p></td><td>120</td><td>12571</td></tr>
  202. <tr><td>69002</td><td>22161</td><td>10/12/2009 9:53:57</td><td><p>ddddddddddddd</p></td><td>120</td><td>12571</td></tr>
  203.  
  204. </div>
  205.  
  206. </body>
  207. </html>