ciao,
prendo a riferimento il sito www3.mecox.com (sotto il codice), ho due domande:
- perchè il margine sx viene correttamente interpretato nella sua reale dimensione con i browser Opera e Mozzilla mentre con IE6, pur mantenendo il layout, la dimensione aumenta di quasi il doppio?
- perchè pur avendo impostato il margine superiore a 0px questo dato viene solo interpretato con IE6 mentre no con opera e mozzilla? come fa il sito HTML.it ad eliminare il margine superiore (ed inferiore) con qualsiasi browser?
esistono soluzioni?
grazie
enrico
questo è il css
* body */
body { margin:0px; padding:0px; background:#dedede; } /*centra in IE 5.x */
hr { display:none; }
A { color:#900; background:transparent; text-decoration:none; }
A:link { color:#900; }
A:visited { color:#900; }
A:hover { color:#FF3300; background-color:transparent; }
.ripristino-float { clear:both; overflow:hidden; }
/* #container */
#container { width:958px; margin:0px auto; border-left:1px solid #ccc; border-right:1px solid #ccc; background-color:#fff; text-align:left; font:10px verdana,sans-serif; } /*centra con altri browser */
/* #header */
#header { background-color:#fff; }
#header p.row { margin-bottom:8px; padding-bottom:8px; text-align:center; border-bottom:1px dotted #000; }
/* #leftcontent */
#leftcontent { float:left; width:632px; margin:8px; padding:0px; background:#fff; color:#000; }
/* #form */
#form { float: left; width: 172px; margin:0px 8px 0px 0px; padding: 0px 0px 4px 0px; border: 1px solid #999; color: #000; }
#form p.head { font-weight: bold; color: #666; background: #fff url(../img/all/square.gif) 4px 4px no-repeat; margin: 0px 0px 6px 0px; padding: 1px 0px 1px 16px; border-bottom: 1px solid #999 }
#form p.line { color: #666; padding: 0px 0px 0px 0px; margin: 6px 6px; border-bottom: 1px dotted #999 }
#form p.content { text-align: right; margin: 0px; padding: 0px 6px 0px 0px; }
#form p.row { text-align: left; margin: 0px 6px 0px 6px; }
#form input { margin: 0px 0px 2px 0px; padding: 1px 0px 0px 0px; font: 10px verdana,sans-serif; display: inline; border: 1px solid #CCC; }
#form .enter { padding: 6px 6px 0px 0px; text-align: right; }
#form .enter input { border: 0px; background: #900; font-weight: bold; color: #FFF; }
/* #arrival */
#arrival { margin:0px 0px 8px 182px; padding-bottom:8px; border-bottom:1px solid #999; }
#arrival p.head_off { font-weight:bold; color:#666; background:url(../img/all/square.gif) 0px 4px no-repeat; margin:0px; padding:0px 0px 0px 16px; }
#arrival p.head_on { font-weight:bold; color:#666; background:url(../img/all/greenball.gif) 0px 4px no-repeat; margin:0px; padding:0px 0px 0px 12px; }
.column-a { float:left; width: 225px; margin:0px; padding:0px; }
.column-b { margin:0; padding:0px; }
#arrival p.row { display:inline; background:url(../img/all/point.gif) 0px 4px no-repeat; margin:0px; padding:0px 0px 0px 12px; }
#arrival p.row_em { font-style: italic; margin: 0px 0px 4px 0px; }
/* #rightcontent */
#rightcontent { float:right; width:310px; margin-top:8px; padding:0px; background:#ccc; }
#rightcontent p.row { font:10px verdana,sans-serif; margin:0px; }
/* #footer */
#footer { background-color:#fff; font:10px verdana,sans-serif; margin:0px; }
#footer p.row { margin-top:8px; padding-top:8px; text-align:center; border-top:1px dotted #000; }
questo l'html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>REL17</title>
<style type="text/css" media="screen">
@import "inc/css.css";
</style>
<SCRIPT LANGUAGE="javaScript" SRC="../inc/date.js"></SCRIPT>
</head>
<body>
<div id="container">
<div id="header">
<?include("inc/header.php")?>
</div>
<div id="leftcontent">
<div id="form">
<?
$kkk=explode("##",$HTTP_COOKIE_VARS[$cookiename]);
if ($kkk[0]=='')
{include('inc/idnl.htm');}
else
{$sqla="SELECT Categoria,Piva,Provincia FROM clienti WHERE IDCliente=".$kkk[0];
$result=mysql_query($sqla);
$row=mysql_fetch_array($result);
if ($row[0]=='Amministratore')
{include('inc/idla.php');}
else
{$piva=$row[1];
$kkk=$HTTP_COOKIE_VARS[$cookiename];
$prov=$row[2];
include('inc/idlu.php');}
}
?>
</div>
<div id="arrival">
<?include("inc/arrival.php")?>
</div>
</div>
<div id="rightcontent">
<p class="row">C O N T E N T</p>
</div>
<div class="ripristino-float"></div>
<div id="footer">
<?include("inc/footer.php")?>
</div>
</div>
</body>
</html>