{"id":15434,"date":"2017-10-26T13:51:28","date_gmt":"2017-10-26T11:51:28","guid":{"rendered":"https:\/\/it.wordpress.org\/support\/topic\/aiuto-centrare-div\/"},"modified":"2017-10-26T13:51:28","modified_gmt":"2017-10-26T11:51:28","slug":"aiuto-centrare-div","status":"publish","type":"topic","link":"https:\/\/it.wordpress.org\/support\/topic\/aiuto-centrare-div\/","title":{"rendered":"Aiuto centrare DIV"},"content":{"rendered":"<p>Ciao a tutti, ho un problema nel centrare dei contenitori (div) rispetto la pagina. La struttura che ho creato e la seguente<\/p>\n<pre><code>\n   &lt;div class=&quot;conteiner1&quot;&gt;\n   &lt;img class=&quot;img1&quot; src=&quot;link immagine&quot; alt=&quot;&quot;&gt;\n   &lt;p class=&quot;p1&quot;&gt; Testo &lt;\/p&gt;\n   &lt;a href=&quot;Testo del link&quot;&gt; Leggi di pi\u00f9 &gt; &lt;\/a&gt;\n   &lt;\/div&gt;\n   &lt;div class=&quot;conteiner1&quot;&gt;\n   &lt;img class=&quot;img1&quot; src=&quot;link immagine&quot; alt=&quot;&quot;&gt;\n   &lt;p class=&quot;p1&quot;&gt; Testo &lt;\/p&gt;\n   &lt;a href=&quot;Testo del link&quot;&gt; Leggi di pi\u00f9 &gt; &lt;\/a&gt;\n   &lt;\/div&gt;\n   &lt;div class=&quot;conteiner1&quot;&gt;\n   &lt;img class=&quot;img1&quot; src=&quot;link immagine&quot; alt=&quot;&quot;&gt;\n   &lt;p class=&quot;p1&quot;&gt; Testo &lt;\/p&gt;\n   &lt;a href=&quot;Testo del link&quot;&gt; Leggi di pi\u00f9 &gt; &lt;\/a&gt;\n   &lt;\/div&gt;\n   &lt;div class=&quot;conteiner1&quot;&gt;\n   &lt;img class=&quot;img1&quot; src=&quot;link immagine&quot; alt=&quot;&quot;&gt;\n   &lt;p class=&quot;p1&quot;&gt; Testo &lt;\/p&gt;\n   &lt;a href=&quot;Testo del link&quot;&gt; Leggi di pi\u00f9 &gt; &lt;\/a&gt;\n   &lt;\/div&gt;\n   &lt;div class=&quot;conteiner1&quot;&gt;\n   &lt;img class=&quot;img1&quot; src=&quot;link immagine&quot; alt=&quot;&quot;&gt;\n   &lt;p class=&quot;p1&quot;&gt; Testo &lt;\/p&gt;\n   &lt;a href=&quot;Testo del link&quot;&gt; Leggi di pi\u00f9 &gt; &lt;\/a&gt;\n   &lt;\/div&gt;\n<\/code><\/pre>\n<p>E questo il relativo css<\/p>\n<pre><code>\n.conteiner1 {\nfloat: left;\nmargin: 20px;\n}\n.img1 {\nwidth: 310px;\nheight: 190px;\n}\n.p1 {\nfont-size: 20px;\nfont-weight: bold;\n}\n<\/code><\/pre>\n<p>L\u2019effetto che ottengo \u00e8 quello che desidero, ovvero le immagini si affiancano l\u2019una all\u2019altra, solo che non si centrano. Ci sono sempre degli spazi diversi a destra e a sinistra dell\u2019ultima immagine rispetto alla pagina come se non fossero centrate. Ho provato anche a racchiudere la struttura in un div e centrarlo in orizzontale ma non sono riuscito. Qualcuno sa aiutarmi, anche cambiando struttura ma ottenendo il medesimo risultato.<br \/>\nFOTO     FOTO<br \/>\nTESTO    TESTO<br \/>\nLINK     LINK<br \/>\nAllineati e centrati<br \/>\nGrazie mille<\/p>\n","protected":false},"template":"","class_list":["post-15434","topic","type-topic","status-publish","hentry","topic-tag-centrare","topic-tag-centrare-con-css","topic-tag-centrare-div","topic-tag-centrare-elementi","topic-tag-centrare-immagini","topic-tag-flexbox","topic-tag-grid"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/it.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15434","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/it.wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/it.wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/it.wordpress.org\/support\/wp-json\/wp\/v2\/topic\/15434\/revisions"}],"wp:attachment":[{"href":"https:\/\/it.wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=15434"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}