• Super User

    div e posizionamento laterale.

    Ciao a tutti,

    sto facendo il layout di un sito ora ho impostato un div container che contiene al suo interno gli altri div,

    ora il problema sono i div ai due lati che praticamente scendono piu in basso dal container , che è di colore bianco su sfondo blu, quindi mi si crea [url=http://www.prolocopaola.it/index2.php] questo sgradevole effetto
    i due div laterali sono
    menu_sx (div di sinistra)
    varie( div di destra)

    posto il codice del file css:

    #container {
    width: 800px;
    margin-right: 50px;
    margin-bottom: 5px;
    margin-left: 100px;
    background-color: #FFFFFF;
    border: medium solid #852f30;
    }
    body
    {
    background-color:#000066;
    font-family: tahoma;
    font-size: 0.9em;
    }#menu_up {
    background-color:;
    height: 30px;
    border-top-width: thin;
    border-right-width: thin;
    border-bottom-width: thin;
    border-left-width: thin;
    border-top-style: dotted;
    border-top-color:;
    border-right-color:;
    border-bottom-color:;
    border-left-color:;
    margin: 5px;
    padding: 5px;
    }
    #menu_up a {
    background-color:;
    margin: 5px;
    padding: 5px;
    text-decoration: none;
    display: block;
    width: 100px;
    float: left;
    color:;
    }
    a:hover {
    background-color: #CC3333;
    border-top-width: thin;
    border-right-width: thin;
    border-bottom-width: thin;
    border-left-width: thin;
    border-top-style: dotted;
    border-top-color:;
    border-right-color:;
    border-bottom-color:;
    border-left-color:;
    margin: 5px;
    padding: 5px;
    text-decoration: none;
    display: block;
    }
    #menu_sx {
    border: thin dotted;
    margin: 2px;
    padding: 2px;
    width: 130px;
    font-size: 0.9em;
    text-decoration: none;
    float: left;
    list-style-type: none;
    }
    ul {
    list-style-type: none;
    white-space: normal;
    display: inline;
    text-decoration: none;
    }
    a {
    display: block;
    margin: 2px;
    padding: 2px;
    height: 15px;
    }
    #google {
    width: 470px;
    margin-left: 150px;
    }
    #varie {
    float: right;
    width: 130px;
    margin: 5px;
    padding: 5px;
    }
    #articoli {
    float: no;
    margin-left: 150px;
    width: 470px;
    }

    Puo dipendere da un errato uso dell'attributo float?

    Grazie.


  • Super User

    Ho risolto il problema,

    ho inserito:
    <div style="clear:both;"></div>
    alla fine della subito dopo il div footer.

    Lo posto cosi che possa essere visibile e magari di aiuto a chi potrebbe incorrere nello stesso problema.

    Ciao