Visualizzazione dei risultati da 1 a 4 su 4
  1. #1
    Utente di HTML.it
    Registrato dal
    Feb 2002
    Messaggi
    957

    Internet Explorer e margini inesistenti...

    Ciao a tutti,
    ho questo codice html:


    codice:
    <style type="text/css">
    <!--
    body {
    	margin:0px;
    }
    #top1 {
    	background-image: url(images/top.jpg);
    	background-repeat: no-repeat;
    	background-position: left top;
    	width:543px;
    	height:42px;
    	float:left;
    	line-height:42px;
    	margin:0px;
    }
    #top2 {
    	background-image: url(images/top2.jpg);
    	background-repeat: repeat-x;
    	background-position: left top;
    	height:42px;
    	float:none;
    	line-height:42px;
    	margin:0px;
    
    }
    #bottom1 {
    	background-image: url(images/bottom.jpg);
    	background-repeat: repeat-x;
    	background-position: left top;
    	height:20px;
    	line-height:20px;
    	float:none;
    	margin:0px;
    }
    #bottom2 {
    	background-image: url(images/bottom2.jpg);
    	background-repeat: no-repeat;
    	background-position: left top;
    	width:186px;
    	height:20px;
    	line-height:20px;
    	float:right;
    }
    -->
    </style>
    </head>
    
    <body>
    <div id="top1"></div><div id="top2"></div>
    
    <div id="bottom2"></div><div id="bottom1"></div>
    
    </body>
    </html>
    tra i 2 div top e i 2 div bottom c'è un margine bianco... perchè?
    La cosa divertente è che su Firefox non c'è, su Internet Explorer si.
    Perchè? Grazie

  2. #2
    Utente di HTML.it L'avatar di mexican
    Registrato dal
    Oct 2001
    residenza
    cava de tirreni
    Messaggi
    3,541

    mmmm

    prova a mettere top-margin:0px

  3. #3
    Frontend samurai L'avatar di fcaldera
    Registrato dal
    Feb 2003
    Messaggi
    12,924
    potrebbe essere il problema chiamato "3 pixel jog" oppure il problema del raddoppio dei margini sugli elementi flottati

    fai una ricerca su http://positioniseverything.net/


    Ciao
    Vuoi aiutare la riforestazione responsabile?

    Iscriviti a Ecologi e inizia a rimuovere la tua impronta ecologica (30 alberi extra usando il referral)

  4. #4
    Utente di HTML.it
    Registrato dal
    Feb 2002
    Messaggi
    957
    penso fosse il prob del 3px...
    cmq ho risolto per via non proprio ortodossa... ho incapsulato un div dentro l'altro.

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 © 2025 vBulletin Solutions, Inc. All rights reserved.