• User Attivo

    Accentrare tabella

    Ho questo codice, però il blocco dei "quadrati" è tutto accentrato verso sinistra, che codice dovrei aggiungere per spostare questa tabella al centro?

    
    <html>
    <head><script type="text/javascript">window.NREUM||(NREUM={}),__nr_require=function a(b,c,d){function e(f){if(!c){var g=c={exports:{}};b[0].call(g.exports,function(a){var c=b[1][a];return e(c?c:a)},g,g.exports,a,b,c,d)}return c.exports}for(var f=0;f<d.length;f++)e(d);return e}({"4O2Y62":[function(a,b){function c(a,b){var c=d[a];return c?c.apply(this,b):(e[a]||(e[a]=[]),void e[a].push(b))}var d={},e={};b.exports=c,c.queues=e,c.handlers=d},{}],handle:[function(a,b){b.exports=a("4O2Y62")},{}],YLUGVp:[function(a,b){function c(){var a=m.info=NREUM.info;if(a&&a.agent&&a.licenseKey&&a.applicationID){m.proto="https"===l.split(":")[0]||a.sslForHttp?"https://":"http://",g("mark",["onload",f()]);var b=i.createElement("script");b.src=m.proto+a.agent,i.body.appendChild(b)}}function d(){"complete"===i.readyState&&e()}function e(){g("mark",["domContent",f()])}function f(){return(new Date).getTime()}var g=a("handle"),h=window,i=h.document,j="addEventListener",k="attachEvent",l=(""+location).split("?")[0],m=b.exports={offset:f(),origin:l};i[j]?(i[j]("DOMContentLoaded",e,!1),h[j]("load",c,!1)):(i[k]("onreadystatechange",d),h[k]("onload",c)),g("mark",["firstbyte",f()])},{handle:"4O2Y62"}],loader:[function(a,b){b.exports=a("YLUGVp")},{}]},{},["YLUGVp"]);</script>
    <style type=text/css>
    body{
    color:red;
    background-color:#ffffff;
    
    }
    
    .cella{
    background-color:#fefefe;
    COLOR:BLACK;
    border:1px solid #0a68f4;
    margin:2px;
    padding:0px;
    width:150px;
    height:90px;
    float:left;
    screen:auto;
    
    }
    </style>
    </head>
    <body>
    
    <div class=cella><div style="text-align:center">
    <img src="images" border="0" alt="immagine 1" style="border: 1px solid #000000;" />
    </div></div>
    <div class=cella><div style="text-align:center">
    <img  src="images" border="0" alt="immagine 2" style="border: 1px solid;" />
    </div></div>
    <div class=cella>3</div>
    <div class=cella>4</div><div class=cella>5</div><div class=cella></div>
    <div class=cella>6</div><div class=cella>7</div><div class=cella></div>
    <div class=cella>8</div><div class=cella>9</div><div class=cella></div>
    <div class=cella></div><div class=cella></div><div class=cella></div>
    <div class=cella></div><div class=cella></div><div class=cella></div>
    <div class=cella></div><div class=cella></div><div class=cella></div>
    <div class=cella></div><div class=cella></div><div class=cella></div>
    <div class=cella></div><div class=cella></div><div class=cella></div>
    <div class=cella></div><div class=cella></div><div class=cella></div>
    <div class=cella></div><div class=cella></div><div class=cella></div>
    <div class=cella></div><div class=cella></div><div class=cella></div>
    <div class=cella></div><div class=cella></div><div class=cella></div>
    <div class=cella></div><div class=cella></div><div class=cella></div>
    <div class=cella></div><div class=cella></div><div class=cella></div>
    <div class=cella></div><div class=cella></div><div class=cella></div>
    <div class=cella></div><div class=cella></div><div class=cella></div>
    <div class=cella></div><div class=cella></div><div class=cella></div>
    <div class=cella></div><div class=cella></div><div class=cella></div>
    <div class=cella></div><div class=cella></div><div class=cella></div>
    
     
    </div>
    <script type="text/javascript">window.NREUM||(NREUM={});NREUM.info={"beacon":"beacon-1.newrelic.com","licenseKey":"1b473294f5","applicationID":"550561","transactionName":"M1QBYUMCDUAEWkRfWgoeNkdYTAVcF0xdGUMGQgZaHxMLQw==","queueTime":0,"applicationTime":47,"ttGuid":"","agentToken":"","userAttributes":"","errorBeacon":"jserror.newrelic.com","agent":"js-agent.newrelic.com\/nr-323.min.js"}</script></body>
    </html>
    

  • User Attivo

    Prova a racchiudere tutto con un <div> così:
    [html]
    <div style="width: 50%; margin: auto;">
    <div class=cella>
    ...
    </div>
    [/html]
    Ovviamente la larghezza del div (quella che adesso ho messo al 50%) la decidi tu in base a quanto vuoi larga la "tabella"


  • User Attivo

    Grazie , funziona.