<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Centrare un div]]></title><description><![CDATA[<p dir="auto">Salve a tutti, ho un problema che sicuramente sapete risolvere.</p>
<p dir="auto">Intanto partiamo con il dirvi che io sono alle primissime armi sia in  CSS che in HTML, ma studiando qualcosa sta uscendo fuori...</p>
<p dir="auto">Il mio problema è il seguente:</p>
<pre><code class="language-html">&lt;head&gt;
&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8" /&gt;
&lt;title&gt;Untitled Document&lt;/title&gt;

&lt;link href="style.css" rel="stylesheet" type="text/css" /&gt;
&lt;style type="text/css"&gt;
&lt;!--
body {
    background-color:#CCC;
}
#wrapper {
    margin:20px auto ;
    width:960px;
    background-color:#FFF;
}
#header {
    width:960px;
    height:90px;
    padding-top:5px;
}
#logo {
    float:left;
    width:220px;
}
#numero {
    float:left;
    width:740px;
    text-align: right;
}
#menu-up {
    float:left;
    width:740px;
    height:40px;
}
#menu-up ul {
    list-style-type:none;
    margin:0;
    padding:0;
}
#menu-up ul li {
    display:block;
    float:right;
}
#menu {
    width:960px;
    height:52px;
    background-color:#F00;
    float:left;
}
#content {
    float: left;
    width: 960px;
    height: 100px;
}

--&gt;
&lt;/style&gt;
&lt;/head&gt;

&lt;body&gt;
    &lt;div id="wrapper"&gt;
        &lt;div id="header"&gt;
            &lt;div id="logo"&gt;&lt;img src="image/logo.gif" /&gt;&lt;/div&gt;
            &lt;div id="numero"&gt;&lt;img src="image/numero.gif" /&gt;&lt;/div&gt;
            &lt;div id="menu-up"&gt;
                &lt;ul&gt;
                    &lt;li&gt;&lt;a class="chi" href="#"&gt;Chi siamo&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a class="dove" href="#"&gt;Dove siamo&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a class="job" href="#"&gt;Lavora con noi&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a class="login" href="#"&gt;Login&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a class="trasp" href="#"&gt;Trasparenza&lt;/a&gt;&lt;/li&gt;
                    &lt;li&gt;&lt;a class="cont" href="#"&gt;Contatti&lt;/a&gt;&lt;/li&gt;
                &lt;/ul&gt;
            &lt;/div&gt;
            &lt;div id="menu"&gt;&lt;/div&gt; &lt;!-- fine menu --&gt;
        &lt;/div&gt; &lt;!-- fine header --&gt;
        &lt;div id="content"&gt;&lt;/div&gt;
    &lt;/div&gt; &lt;!-- fine wrapper --&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
<p dir="auto">Il div "wrapper" è quello che dovrebbe centrare tutto il sito, ma il  problema è nella lunghezza di questo, se io vado ad aggiungere il div  content, questo va a posizionarsi sotto al wrapper ma no dentro, questo  comporta il mancato riempimento del sudetto con il background del  wrapper.</p>
<p dir="auto">Come devo fare?</p>
]]></description><link>https://dev.connect.gt/topic/126424/centrare-un-div</link><generator>RSS for Node</generator><lastBuildDate>Thu, 26 Nov 2026 18:29:43 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/126424.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 28 Apr 2010 08:33:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Centrare un div on Mon, 21 Jun 2010 07:18:30 GMT]]></title><description><![CDATA[<p dir="auto">Appena dopo la fine del div content metti un meraviglioso:<br />
&lt;div style="clear:both"&gt;&lt;/div&gt;</p>
]]></description><link>https://dev.connect.gt/post/907425</link><guid isPermaLink="true">https://dev.connect.gt/post/907425</guid><dc:creator><![CDATA[develup]]></dc:creator><pubDate>Mon, 21 Jun 2010 07:18:30 GMT</pubDate></item><item><title><![CDATA[Reply to Centrare un div on Sat, 05 Jun 2010 11:38:59 GMT]]></title><description><![CDATA[<p dir="auto">si potrebbe anche tentare un<br />
<a href="/hashtags/wrapper">#wrapper</a>  {<br />
overflow: hidden;<br />
}<br />
o al limite overflow: auto;</p>
]]></description><link>https://dev.connect.gt/post/907479</link><guid isPermaLink="true">https://dev.connect.gt/post/907479</guid><dc:creator><![CDATA[cdjjj]]></dc:creator><pubDate>Sat, 05 Jun 2010 11:38:59 GMT</pubDate></item><item><title><![CDATA[Reply to Centrare un div on Wed, 28 Apr 2010 13:23:24 GMT]]></title><description><![CDATA[<p dir="auto">Togli float: left al div content. Inoltre non vincolerei l'altezza del content a 100px.</p>
]]></description><link>https://dev.connect.gt/post/907413</link><guid isPermaLink="true">https://dev.connect.gt/post/907413</guid><dc:creator><![CDATA[codencode]]></dc:creator><pubDate>Wed, 28 Apr 2010 13:23:24 GMT</pubDate></item></channel></rss>