Thomas: margin-top in IE un FF anderst interpretiert

Beitrag lesen

Hallo Leute,

Also ich habe folgendes Problem.
margin-top wird im IE richtig dargestellt, jedoch in FF nicht.

Hier der code[HTML]:
[code lang=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" lang="en" xml:lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="Layout.css" rel="stylesheet" media="screen">
<link href="ajaxtabs/ajaxtabs.css" rel="stylesheet" media="screen">

<script>
PositionX = 10;
PositionY = 10;
defaultWidth  = 600;
defaultHeight = 400;

var AutoClose = true;

function popImage(imageURL,imageTitle){
  var imgWin = window.open('','_blank','scrollbars=no,resizable=1,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY);
  if( !imgWin ) { return true; } //popup blockers should not cause errors
  imgWin.document.write('<html><head><title>'+imageTitle+'</title><script type="text/javascript">\n'+
    'function resizeWinTo() {\n'+
    'if( !document.images.length ) { document.images[0] = document.layers[0].images[0]; }'+
    'var oH = document.images[0].height, oW = document.images[0].width;\n'+
    'if( !oH || window.doneAlready ) { return; }\n'+ //in case images are disabled
    'window.doneAlready = true;\n'+ //for Safari and Opera
    'var x = window; x.resizeTo( oW + 200, oH + 200 );\n'+
    'var myW = 0, myH = 0, d = x.document.documentElement, b = x.document.body;\n'+
    'if( x.innerWidth ) { myW = x.innerWidth; myH = x.innerHeight; }\n'+
    'else if( d && d.clientWidth ) { myW = d.clientWidth; myH = d.clientHeight; }\n'+
    'else if( b && b.clientWidth ) { myW = b.clientWidth; myH = b.clientHeight; }\n'+
    'if( window.opera && !document.childNodes ) { myW += 16; }\n'+
    'x.resizeTo( oW = oW + ( ( oW + 200 ) - myW ), oH = oH + ( (oH + 200 ) - myH ) );\n'+
    'var scW = screen.availWidth ? screen.availWidth : screen.width;\n'+
    'var scH = screen.availHeight ? screen.availHeight : screen.height;\n'+
    'if( !window.opera ) { x.moveTo(Math.round((scW-oW)/2),Math.round((scH-oH)/2)); }\n'+
    '}\n'+
    '</script>'+
    '</head><body onload="resizeWinTo();"'+(AutoClose?' onblur="self.close();"':'')+'>'+
    (document.layers?('<layer left="0" top="0">'):('<div style="position:absolute;left:0px;top:0px;display:table;">'))+
    '<img src='+imageURL+' alt="Loading image ..." title="" onload="resizeWinTo();">'+
    (document.layers?'</layer>':'</div>')+'</body></html>');
  imgWin.document.close();
  if( imgWin.focus ) { imgWin.focus(); }
  return false;
}
</script>

<script type="text/javascript" src="ajaxtabs/ajaxtabs.js">

/***********************************************
* Ajax Tabs Content script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

</script>
<title>seprelle</title>
</head>

<body>
<div align="center" style="height:100%; margin-top:0px;">
 <div id="main" style="margin-top:0px;">
   <!--Header-->
   <div style="display:block; margin-left:5px; margin-top:5px; width:830px; height:120px; background-image:url(headerbackg.jpg); text-align:right;">
     <div style="width:210px; height:100px; text-align:left; margin-top:10px; margin-right:10px; float:right; vertical-align:top;">
    <div><div style="font-family:Arial, Helvetica, sans-serif; font-weight:bold; color:#000000; font-size:12px; text-decoration:underline; float:left;">SignIn:</div><div style="margin-right:5px; text-align:right;"><a href="password.php">forgot my password!</a></div></div>
    <div style="margin-top:20px">
    <form action="login.php" method="post">
      <div style="text-align:right; margin-right:5px;">email: <input type="text" name="email_log" class="header_log"/></div>
      <div style="text-align:right; margin-right:5px; margin-top:0px;">password: <input type="password" name="password_log" class="header_log"/></div>
      <div style="margin-right:95px; margin-top:5px; text-align:right;">
       <input type="submit" name="login" value="LogIn" class="loginbtn" onmouseover="this.className='loginbtn_hover'" onmouseout="this.className='loginbtn'"/>
      </div>
    </form>
    </div>
     </div>
  <div style="display:block; text-align:left; margin-top:5px; margin-left:5px; height:100px;">
   <img src="logo.png" border="0" alt="sePrelle Home"/>
  </div>
   </div>
   <!--Header Ende-->

<div id="inhalt">
  <table cellspacing="0" style="width:830px; margin-top:10px;">
   <tr>
   <td style="width:500px; vertical-align:top;">
   <div style="margin-left:0px; margin-top:10px;">
   <ul id="maintab" class="shadetabs">
   <li class="selected"><a href="#default" rel="ajaxcontentarea">test1</a></li>
   <li><a href="external.htm" rel="ajaxcontentarea">test2</a></li>
   <li><a href="external2.htm" rel="ajaxcontentarea">test3</a></li>
   <li><a href="external3.htm" rel="ajaxcontentarea">test4</a></li>
   <li><a href="external4.htm" rel="ajaxcontentarea">test5</a></li>
   </ul>

<div id="ajaxcontentarea" class="contentstyle">
   <p>test2</p>
   </div>
   </div>

<script type="text/javascript">
   startajaxtabs("maintab")
   </script>
   </td>
   <td style="text-align:right; width:830px; vertical-align:top;">
    test
   </td>
   </tr>
  </table>
  </div>
 </div>
</div>
</body>
</html>
[code lang=text]

Und hier der css teil:
[code lang=css]
html, body
{
 height:100%;
 margin:0px;
 padding:0px;
}
body
{
 background-color:#222222;

color:#333333;

font-size:11px;
 font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif;
}
div#main
{
 height:100%;
 text-align:left;
 vertical-align:top;
 background-color:#FFFFFF;
 width:840px;
}
div#inhalt
{
 margin-left:5px;
 width:830px;
 background-repeat:repeat-x;
 height:auto;
 text-align:left;
}
input.header_log
{
 color:#333333;
 font-size:11px;
 height:12px;
 width:140px;
}
a:link, a:visited
{
 color:#333333;
 font-size:11px;
 font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif;
}
a:hover
{
 color:#FFFFFF;
 font-size:11px;
 font-family:"Lucida Sans Unicode", "Lucida Grande", sans-serif;
}
input.loginbtn
{
 width:55px;
 color:#050;
 font-family:'trebuchet ms',helvetica,sans-serif;
 font-size:10px;
 font-weight:bold;
 background-color:#fed;
 border:1px solid;
 border-top-color:#696;
 border-left-color:#696;
 border-right-color:#363;
 border-bottom-color:#363;
 filter:progid:DXImageTransform.Microsoft.Gradient (GradientType=0,StartColorStr='#ffffffff',EndColorStr='#ffeeddaa');
}
input.loginbtn_hover
{
 width:55px;
 color:#050;
 font-family:'trebuchet ms',helvetica,sans-serif;
 font-size:10px;
 font-weight:bold;
 background-color:#fed;
 border:1px solid;
 border-top-color:#c63;
 border-left-color:#c63;
 border-right-color:#930;
 border-bottom-color:#930;
 filter:progid:DXImageTransform.Microsoft.Gradient (GradientType=0,StartColorStr='#ffffffff',EndColorStr='#ffeeddaa');
}

[code lang=text]
Bitte könntihr euch das mal durchschauen, wahrscheinlich hab ich eh mehrere fehler:)

Aber schonmal danke im voraus.

mfg tom