Visualizzazione dei risultati da 1 a 3 su 3
  1. #1

    Problema con float e clear

    Salve, ho un problema con flat e clear.. Ho un menù dove varie div che rappresentano 'tasti' hanno come proprietà float: left; e sono racchiuse in un div chiamato menù. Il problema è che poi ho creato un altro div chiamato content ma si affianca al menù, quindi gli ho messo clear: both ma il problema è che così non vengono rispettate le 'funzioni' margin: 8px auto; e padding.. La pagina con clear:both è questa: http://beateaters.it/news/login.php , senza è questa: http://beateaters.it/news/login_clear.php . Nella prima è come dovrebbe essere il fieldset dove si trova il login, ma c'è quel problema del float, invece nella seconda non c'è il problema del float ma non appare come dovrebbe il fieldset. I codici sono i seguenti:

    CSS:

    codice:
    #m_left, #m_right {
    background: url(../images/menu/box_sinistra.gif);
    width: 8px;
    height: 43px;
    float: left;
    }
    
    #m_right {
    width: 13px;
    background: url(../images/menu/box_destra.png);
    float: right;
    }
    
    #classifiche {
    background: url(../images/menu/classifiche1.gif);
    width: 121px;
    height: 43px;
    float: left;
    }
    
    #classifiche:hover, #classifiche_tp {
    background: url(../images/menu/classifiche2.gif);
    width: 121px;
    height: 43px;
    float: left;
    }
    
    #contatti {
    background: url(../images/menu/contatti1.gif);
    width: 105px;
    height: 43px;
    float: left;
    }
    
    #contatti:hover, #contatti_tp {
    background: url(../images/menu/contatti2.gif);
    width: 105px;
    height: 43px;
    float: left;
    }
    
    #forum {
    background: url(../images/menu/forum1.gif);
    width: 70px;
    height: 43px;
    float: left;
    }
    
    #forum:hover, #forum_tp {
    background: url(../images/menu/forum2.gif);
    width: 70px;
    height: 43px;
    float: left;
    }
    
    #home {
    background: url(../images/menu/home1.gif);
    width: 72px;
    height: 43px;
    float: left;
    }
    
    #home:hover, #home_tp {
    background: url(../images/menu/home2.gif);
    width: 72px;
    height: 43px;
    float: left;
    }
    
    #programmi {
    background: url(../images/menu/programmi1.gif);
    width: 110px;
    height: 43px;
    float: left;
    }
    
    #programmi:hover, #programmi_tp {
    background: url(../images/menu/programmi2.gif);
    width: 110px;
    height: 43px;
    float: left;
    }
    
    #palinsesto {
    background: url(../images/menu/palinsesto1.gif);
    width: 110px;
    height: 43px;
    float: left;
    }
    
    #palinsesto:hover, #palinsesto_tp {
    background: url(../images/menu/palinsesto2.gif);
    width: 110px;
    height: 43px;
    float: left;
    }
    
    #radio {
    background: url(../images/menu/radio1.gif);
    width: 65px;
    height: 43px;
    float: left;
    }
    
    #radio:hover, #radio_tp {
    background: url(../images/menu/radio2.gif);
    width: 65px;
    height: 43px;
    float: left;
    }
    
    #diretta {
    background: url(../images/menu/diretta1.gif);
    width: 290px;
    height: 43px;
    float: left;
    }
    
    #diretta:hover, #diretta_tp {
    background: url(../images/menu/diretta2.gif);
    width: 290px;
    height: 43px;
    float: left;
    }
    
    #menu {
    margin: auto;
    text-align: center;
    }
    
    #menu a:link, #menu a:visited, #menu a:hover {
    color: trasparent;
    text-decoration: none;
    outline: none;
    border: none;
    }
    HTML:

    codice:
     <div id="menu">
    		<div id="m_left"></div><div id="home_tp"></div><div id="radio"></div><div id="programmi"></div><div id="palinsesto"></div><div id="classifiche"></div><div id="forum"></div><div id="contatti"></div><div id="diretta"></div><div id="m_right"></div>
    	</div>
    
    	<div id="content">
    <fieldset id="log-admin">
    <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="POST">
    Username
    
    <input type="text" class="i_txt" name="username" />
    
    
    Password
    
    <input type="password" class="i_txt" name="password" />
    
    
    <input type="image" value="" src="../images/accedi.png" height="30" width="61" name="login" /></form></fieldset>
    Social Network in costruzione.. Misto tra Twitter e Facebook.. Twitbook o facetter?

  2. #2
    Mamma mia che confusione. Scusami ma si capisce ben poco.
    Se mi fai veder cosa vuoi ottenere magarieti posso dare una mani

  3. #3
    Ho già risolto mettendo un <div style="clear: both;"></div> al posto di
    . PS: I codici non mi sembrano affatto incasinati
    Social Network in costruzione.. Misto tra Twitter e Facebook.. Twitbook o facetter?

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.