3px sprung ie

Status
Nicht offen für weitere Antworten.

08154711

Erfahrenes Mitglied
Hi,
Ich habe eine Navileiste welche gefloatet ist, leider klappts nur im Firefox im IE hat man einen Abstand zwischen Navi und Content. Per CSS oder Conditional Comment kann man dem IE dies auch begreiflich machen, hier der Code
Code:
#container {
	margin: 40px auto;
	background: #FFFFFF url(images/ctbg.gif) no-repeat;
	width: 750px;
}
#current a {
	background-color:#BF0A19;
}
#topheader {
	height: 100px;
	border-bottom: 1px solid #777777;
	color: #ff6600;
	width: 750px;
}
#theader {
	color: #4666A6;
	position: relative;
	margin: 0 auto;
	width: 500px;
	left: 45px;
}
#theadert {
	position:absolute;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
	color: #666666;
	padding-left: 8px;
	margin-top: -53px;
	width: 115px;
}
#mainbanner {
	height: 88px;
	border-bottom: 1px solid #303030;
}
#outer {
	width:750px;
	height:27px;
	padding-top: 49px;
}
#menu {
	list-style-type:none;
	width:750px;
	margin: 0;
	padding: 0 0 0 1px;
}
#menu ul {
	list-style-type:none;
	padding:0px;
	margin:0px;
}
#menu li {
	float:left;
	background:#088;
	margin:1px 1px 0 0;
	background-color: #0033CC;
}
#menu li.sub {
	background:#000;
}
#menu li, #menu li a {
	display:block;
	color:#FFFFFF;
	font-family:Arial, Helvetica, sans-serif;
	font-size:12px;
	line-height:24px;
	text-decoration:none;
	text-align:center;
	cursor:pointer;
	font-weight:bold;
	width: 123.8px;
}
#menu li:hover, #menu li a:hover {
	background:#EFAB4A;
	letter-spacing: 1px;
	color: #000000;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}
#body {
	float: none;
	clear:both;
	width: 750px;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-style:italic;
	font-size:10px;
}
#footer {
	width: 750px;
	margin: 0 auto;
	background:url(images/footer.gif) no-repeat;
	height: 19px;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
	text-align: center;
	padding-top: 5px;
}
a:link, a:active, a:visited {
	text-decoration:none;
	color:#000000;
}
a:hover {
	background-color:#5C832F;
	color:#FFFFFF;
}
body {
	margin: 0;
	background: #657BA6 url(images/bg.gif) repeat-x;
}
h2 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	letter-spacing: -0.8px;
	font-size: 24px;
	color: #303030;
	margin: 0 0 0 0;
	padding-top: 16px;
	padding-bottom: 12px;
	padding-left: 35px;
}
h3 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 20px;
	color: #ff6600;
	margin: 0 0 0 43px;
	padding-top: 0px;
}
.intro {
	margin-top: 5px;
	padding-right: 43px;
	width: 670px;
	padding-top: 12px;
	height: 800px;
	background: url(images/introbg1.gif) no-repeat #FFF;
	color: #000;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size:11px;
	line-height: 13px;
	text-align:justify;
	padding-left: 37px;
}
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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>TEST</title>
<style type="text/css">
.acopy {
	text-decoration:none;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
}
</style>
<link rel="stylesheet" type="text/css" href="style.css" />
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body>
<div id="container">
  <div id="topheader">
    <h1 id="theader"><img src="http://www.tutorials.de/forum/images/mainheader.jpg" alt="mainheader" width="500" height="100" /></h1>
    <span id="theadert">Adresse </span> </div>
  <div id="mainbanner">
    <script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','750','height','138','title','main','src','flash/main','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','flash/main' ); //end AC code
</script>
    <noscript>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="750" height="138" title="main">
      <param name="movie" value="flash/main.swf" />
      <param name="quality" value="high" />
    </object>
    </noscript>
  </div>
  <div id="outer">
    <ul id="menu">
      <li class="sub"><a href="index.html">Home</a> </li>
      <li class="sub"><a href="service.html">Leistung</a> </li>
      <li class="sub"><a href="produkte.html">Produkte</a> </li>
      <li class="sub"><a href="about.html">&Uuml;ber mich</a></li>
      <li class="sub"><a href="kontakt.html">Kontakt</a></li>
      <li class="sub" id="current"><a href="impressum.html">Impressum</a></li>
    </ul>
  </div>
  <div id="body"><br />
    <br />
    <h2>Impressum</h2>
    <div class="intro">Text <br />
      <strong>Text</strong> <br />
      <br />
      </div>
  <div id="footer">&nbsp;</div>
</div>
<br />
<br />
<div style="position: fixed; bottom: 0; right: 0; width: 391px; height: 350px;"><img src="http://www.tutorials.de/forum/images/left1.png"  width="391" height="350"/></div>
</body>
</html>
 
Meines Erachtens liegt hier überhaupt nicht der "Three Pixel Gap"-Bug vor, falls du von der Lücke zwischen dem letzten Menüpunkt "Impressum" und dem rechten Boxenrand von #container sprichst.

Vielmehr zeigt der IE die Navileiste schlichtzweg zu kurz an, was wohl mit der dezimalen Breitenangabe (123.8px) für die Menüpunkte zusammenhängt:

ie.jpg

mfg Maik
 
Hi,
Diesen Wert habe ich geändert auf 123px, und dann etwas probiert. Wahrscheinlich gibt es noch eine bessere Lösung. Hier der geänderte Code
Code:
#container {
	margin: 40px auto;
	background: #FFFFFF url(images/ctbg.gif) no-repeat;
	width: 750px;
}
#current a {
	background-color:#BF0A19;
}
#topheader {
	height: 100px;
	border-bottom: 1px solid #777777;
	color: #ff6600;
	width: 750px;
}
#theader {
	color: #4666A6;
	position: relative;
	margin: 0 auto;
	width: 500px;
	left: 45px;
}
#theadert {
	position:absolute;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
	color: #666666;
	padding-left: 8px;
	margin-top: -53px;
	width: 115px;
}
#mainbanner {
	height: 88px;
	border-bottom: 1px solid #303030;
}
#outer {
	width:750px;
	height:27px;
	padding-top: 49px;
}
#menu {
	list-style-type:none;
	width:750px;
	margin: 0;
	padding: 0;
	margin-left: 0px;
}
#menu ul {
	list-style-type:none;
	padding:0px;
	margin:0;
}
#menu li {
	background:#088;
	margin:1px 1px 0 1px;
	background-color: #0033CC;
	float: left;
}
#menu li.sub {
	background:#000;
}
#menu li, #menu li a {
	display:block;
	color:#FFFFFF;
	font-family:Arial, Helvetica, sans-serif;
	font-size:12px;
	line-height:24px;
	text-decoration:none;
	text-align:center;
	cursor:pointer;
	font-weight:bold;
	width: 123px;
}
#menu li:hover, #menu li a:hover {
	background:#EFAB4A;
	letter-spacing: 1px;
	color: #000000;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}
#body {
	width: 750px;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-style:italic;
	font-size:10px;
}
#footer {
	width: 750px;
	margin: 0 auto;
	background:url(images/footer.gif) no-repeat;
	height: 19px;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
	text-align: center;
	padding-top: 5px;
}
a:link, a:active, a:visited {
	text-decoration:none;
	color:#000000;
}
a:hover {
	background-color:#FFCC00;
	color:#000000;
}
body {
	margin: 0;
	background: #657BA6 url(images/bg.gif) repeat-x;
}
h2 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	letter-spacing: -0.8px;
	font-size: 24px;
	color: #303030;
	margin: 0 0 0 0;
	padding-top: 16px;
	padding-bottom: 12px;
	padding-left: 35px;
}
h3 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 20px;
	color: #ff6600;
	margin: 0 0 0 43px;
	padding-top: 0px;
}
.intro {
	margin-top: 5px;
	padding-right: 43px;
	width: 670px;
	padding-top: 12px;
	height: 800px;
	background: url(images/introbg1.gif) no-repeat #FFF;
	color: #000;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size:11px;
	line-height: 13px;
	text-align:justify;
	padding-left: 37px;
}
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>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>TEST</title>
<style type="text/css">
.acopy {
	text-decoration:none;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	margin-top: -30px;
}
</style>
<link rel="stylesheet" type="text/css" href="style.css" />
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<body>
<div id="container">
  <div id="topheader">
    <h1 id="theader"><img src="images/mainheader.jpg" alt="mainheader" width="500" height="100" /></h1>
    <span id="theadert">Inhaber<br />
    test</span> </div>
  <div id="mainbanner">
    <script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','750','height','138','title','main','src','flash/main','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','flash/main' ); //end AC code
</script>
    <noscript>
    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="750" height="138" title="main">
      <param name="movie" value="flash/main.swf" />
      <param name="quality" value="high" />
    </object>
    </noscript>
  </div>
  <div id="outer">
    <ul id="menu">
      <li class="sub"><a href="index.html">Home</a> </li>
      <li class="sub"><a href="service.html">Leistung</a> </li>
      <li class="sub"><a href="produkte.html">Produkte</a> </li>
      <li class="sub"><a href="about.html">&Uuml;ber mich</a></li>
      <li class="sub"><a href="kontakt.html">Kontakt</a></li>
      <li class="sub" id="current"><a href="impressum.html">Impressum</a></li>
    </ul>
  </div>
  <div id="body"><br />
    <br />
    <h2>Impressum</h2>
    <div class="intro">Test</div>

<br />
<br />
<div style="position: fixed; bottom: 0; right: 0; width: 250px; height: 218px;"><img src="images/left1.png"  width="250" height="218"  alt="img"/></div>
</body>
</html>
 
Status
Nicht offen für weitere Antworten.
Zurück