XHTMLforum

XHTMLforum (http://xhtmlforum.de/index.php)
-   CSS (http://xhtmlforum.de/forumdisplay.php?f=73)
-   -   IE Bug - Box verschoben - float:left? (http://xhtmlforum.de/showthread.php?t=52650)

joker66 10.07.2008 10:30

IE Bug - Box verschoben - float:left?
 
Hallo liebe xhtmler,

ich habe ein Problem mit einer Internetseite. Da ich selber noch nicht so lange "dabei" bin und ich somit selber und im Forum keine "direkte" Lösung find, wende ich mich nun direkt an euch.

Es geht wiedermal um ein Problem das nur im IE auftritt. Im firefox wird wirklich alles so angezeigt wie es sein soll. Guckt man sich nun folgende Seite im firefox an, kann man dies auch selbst sehen. Schaut man sich das gleiche jetzt im IE an, fällt schnell auf wo das Problem liegt. Rechts gibt es eigentlich eine "Box" mit dem Titel "Kontakt" die im IE einfach verschwindet.

Vision Dubai - Die Welt von morgen

Allerdings ist mir gerade beim schreiben aufgefallen das sich die Box doch auf der Seite befindet, allerdings ganz unten links, wenn man ganz nach unten scrollt. Ich denke mal das das ganze Problem irgendwie an den "floats" liegt allerdings hab ich irklich keine Ahnung wie man das so macht das auch der IE die Box an die richtige stelle setzt.

Da ich diese Seite nur von jemandem übernommen habe bin ich also nicht verantwortlich für die "div-Suppe". Das Problem ist das ich für eine "Präsentation" kurzfristig eine Lösung brauche so das diese Box dort erscheint im IE wo Sie ungefähr soll. Um die 1001 xhtml-Fehler werde ich mich dann demnächst kümmern!

Hier einmal der code der index.php und der zugehörigen css.

PHP-Code:

<?php

require_once("includes/parseTopbox.php");

$link getDataLinks();

$box1  getBoxData($link[0]);
$box2  getBoxData($link[1]);
$box3  getBoxData($link[2]);
$box4  getBoxData($link[3]);
$box5  getBoxData($link[4]);
$box6  getBoxData($link[5]);


/*
 * 0 = bild gross
 * 1 = sterne bild
 * 2 = textinfo
 * 3 = preis link
 * 4 = ort
 * 5 = hotel
 *
 * */
?>


<html>
<head>
<meta http-equiv="Content-Language" content="en" />
<meta name="GENERATOR" content="PHPEclipse 1.0" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" href="includes/screen.css">
<title>Vision Dubai - Die Welt von morgen</title>
</head>
<body>

<div id="maindiv">
 <img border="0" style="margin: 0; padding: 0;" src="img/header.jpg" usemap="#logo"><br>
 <map name="logo">
  <area shape="poly" coords="28, 9 ,291, 9 ,291, 70 ,28, 70" href="index.php">
 </map>
 <div id="top">
  <ul id="mainButtons">
   <li id="button"><a href="index.php"><img src="img/button1.png" /><br></a></li>
   <li id="button"><a href="lastminute.php"><img src="img/button2_black.png" /><br></a></li>
   <li id="button"><a href="info.php"><img src="img/button3_black.png" /><br></a></li>
  </ul>
 </div>
 <div id="utop">

 </div>
 <div id="innerMain">

  <div class="topbox">
   <div class="picdiv"><?php echo str_replace("ixp=pauschal""ixp=katalog"$box1[0]); ?></div>
   <div class="top"><?php echo $box1[6]; ?></div>
   <div class="name"><?php echo $box1[5].$box1[1]; ?></div>
   <div class="preis"><?php echo str_replace("ixp=pauschal""ixp=katalog"$box1[3]); ?></div>
  </div>


  <div class="topbox">
   <div class="picdiv"><?php echo str_replace("ixp=pauschal""ixp=katalog"$box2[0]); ?></div>
   <div class="top"><?php echo $box2[6]; ?></div>
   <div class="name"><?php echo $box2[5].$box2[1]; ?></div>
   <div class="preis"><?php echo str_replace("ixp=pauschal""ixp=katalog"$box2[3]); ?></div>
  </div>


  <div class="topbox">
   <div class="picdiv"><?php echo str_replace("ixp=pauschal""ixp=katalog"$box3[0]); ?></div>
   <div class="top"><?php echo $box3[6]; ?></div>
   <div class="name"><?php echo $box3[5].$box3[1]; ?></div>
   <div class="preis"><?php echo str_replace("ixp=pauschal""ixp=katalog"$box3[3]); ?></div>
  </div>

  <br/>

  <div class="topbox">
   <div class="picdiv"><?php echo str_replace("ixp=pauschal""ixp=katalog"$box4[0]); ?></div>
   <div class="top"><?php echo $box4[6]; ?></div>
   <div class="name"><?php echo $box4[5].$box4[1]; ?></div>
   <div class="preis"><?php echo str_replace("ixp=pauschal""ixp=katalog"$box4[3]); ?></div>
  </div>

  <div class="topbox">
   <div class="picdiv"><?php echo str_replace("ixp=pauschal""ixp=katalog"$box5[0]); ?></div>
   <div class="top"><?php echo $box5[6]; ?></div>
   <div class="name"><?php echo $box5[5].$box5[1]; ?></div>
   <div class="preis"><?php echo str_replace("ixp=pauschal""ixp=katalog"$box5[3]); ?></div>
  </div>

  <div class="topbox">
   <div class="picdiv"><?php echo str_replace("ixp=pauschal""ixp=katalog"$box6[0]); ?></div>
   <div class="top"><?php echo $box6[6]; ?></div>
   <div class="name"><?php echo $box6[5].$box6[1]; ?></div>
   <div class="preis"><?php echo str_replace("ixp=pauschal""ixp=katalog"$box6[3]); ?></div>
  </div>

  <br/>
  <br/>
  &nbsp;<a href="#f" name="f" style="color: #222222;">Booking Engine</a>
  <iframe src="http://comfort.traffics-switch.de/tibet.php?thm=http://www.reiseportal.visiondubai.de/skin_neu/&cfg=0190010100000000&ref=700741&ixp=katalog&typ=P" id="IBEFrame" scrolling="none" frameborder="0" name="frame"></iframe>
 </div>



 <div id="subNavi">
  <img src="img/kontakt.jpg">
  <p>
   Sie haben Fragen?<br />
   Wir helfen Ihnen gerne weiter!
  </p>
  <p class="middle">
   <img class="flag" src="img/dflag.jpg"><strong>0221 - 272 272 - 0</strong>
  </p>
  <p class="little">
   Unsere Hotline erreichen Sie täglich von 9:00 Uhr bis 18:00 Uhr!
  </p>
  <p class="little">
   Email:<br />
   <a href="mailto:service@visiondubai.de"><strong>service@visiondubai.de</strong></a>
  </p>
  <p align="center">
   Wir freuen uns auf Sie!
  </p>
 </div>
</div>

</body>
</html>


Code:

/************************* Allgemeine Bezeichner ************************/
body {
 background-color: black;
 margin: 0;
 padding: 0;
 text-align: center;
 color: #9a8e6e;
 font-size: 10pt;
 font-family: verdana;
}

table {
 font-size: 1em;
}


/************************* Head ************************/

#top {
 width: 100%;
 height: 28px;
 background-image: url(../img/header2.jpg);
 background-repeat: no-repeat;
 padding: 0;
 margin: 0;
}

#utop {
 width: 100%;
 height: 33px;
 background-image: url(../img/buttonunder.jpg);
 background-repeat: x-repeat;
}

#mainButtons {
 margin: 0px;
 list-style: none;
 width: 500px;
 border: 0px solid green;
 position: relative;
 top: 0px;
 left: 250px;
 * left: 120px;

}

#mainButtons img {
 border: 0;
}

#mainButtons #button {
 float: left;
 padding-right: 5px;
}


/************************* Main Div ************************/
#maindiv {
 width: 829px;
 background-color: #222222;
 height: 3360px;
 margin: 0px auto;
}

#innerMain {
 text-align: left;
 float: left;
 border: 0px solid green;
 width: 648px;
 padding: 0;
 margin: 0;
}

#innerMain h1 {
 color: #f6ebc9;
 margin: 10px;
}

#innerMain h2 {
 border: 0px solid green;
 font-size: 10.5pt;
 font-weight: bold;
 color: #ede2c1;
 margin: 15px 10px -5px 10px;
}

#innerMain p {
 margin: 10px;
}

#IBEFrame {
 width: 660px;
 height: 2550px;
 border: 0;
 margin-left: 5px;
}



/************************* Subnavigation ************************/
.topbox {
 width: 171px;
 height: 247px;
 float: left;
 background-image: url(../img/topboxback.jpg);
 background-repeat: no-repeat;
 margin: 20px 0px 20px 33px;
 *margin: 20px 0px 20px 20px;
 padding-top: 2px;
}

.topbox .top {
 position: relative;
 top: -122px;
 left: 3px;
 color: #f6ebc9;
 font-size: 10px;
 font-weight: bold;
 height:50px;
}

.topbox .mainpic {
 border-bottom: 2px solid #e39f20;
 width: 171px;
}

.topbox .picdiv{
 z-index: 99;
 position: relative;
 top: 20px;
}

.topbox img {
 border: 0px;
}

.topbox a {
 border: 0px;
}

.topbox .name {
 padding: 0 3px 0 3px;
 margin-top: -15px;
 text-align: center;
 font-weight: bold;
 height: 40px;
}

.topbox .preis {
 font-weight: bold;
 margin-left: 5px;
}

/************************* Subnavigation ************************/
#subnavi {
 float: left;
 width: 175px;
 height: 330px;
 border: 0px solid green;
 margin: 10px 0 0 0;
 padding: 0 0 0 0;
 background-image: url(../img/kontakt_below.jpg);
 background-repeat: no-repeat;
 text-align: left;
}

#subnavi img{
 margin-left: 0
}

#subnavi p{
 margin: 15px 0 0 0;
 padding: 0 15px 0 15px;
 color: black;
}

#subnavi .middle{
 font-size: 11px;
}

#subnavi .little{
 font-size: 10px;
}

#subnavi .flag{
 margin: 0 5px -3px 0;
}

#subnavi a:link{
 color: #222222;
}
#subnavi a:visited{
 color: #222222;
}
#subnavi a:hover{
 color: #554311;
}
#subnavi a:active{
 color: #222222;
}
a:link{
 color: #E39F20;
}
a:visited{
 color: #E39F20;
}
a:hover{
 color: #E39F20;
}
a:active{
 color: #E39F20;
}

Ich denke mal das dieses Problem für einen "Profi" (wie ich es leider nicht bin) kein wirkliches ist... und deswegen bin ich wirklich sehr dankbar für jede noch so kleine Hilfe! Da ich wirklich kurzfristig dieses Problem beheben muß bin ich wirklich für jeden praktischen Tipp dankbar. In einem anderen Forum wurden mir nur 2 Links zum "float: margin bug" aufgezeigt dir mir aber nichts bringen weil ich dem in diesen Ausmaßen nicht mächtig bin. Am besten wäre wirklich eine konkrete Hilfe an meinem code..

Vielen Dank schon mal!

Mit freundlichen Grüßen aus Wetter,
Mark

Stas 10.07.2008 11:18

Dieses Problem hab ich leider auch.
Ist meine 2. CSS Anpasung ... daher auch noch kein Pro.

Bitte um Hilfe: Stas - Webmedia.org - Professionelles WebDesign & WebCoding seit 2007

Die rechte Box fängt im IE da an,
wo die linke aufhört.

Code:

<!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">
<meta name="description" content="Stas-Webmedia.org Webdesign Webcoding Sale Sponsoring webSPELL Tutorials">
<meta name="keywords" content="clan,free,templates,stas,tutorials,sponsoring,clan sponsoring,free templates,portfolio,webspell">
<meta name="language" content="de">
<meta name="robots" content="index,follow">
<meta name="author" content="Stas Scharapow">
<meta name="abstract" content="WebDesign and WebCoding">
<meta name="copyright" content="2008 - 2009 by Stas-Webmedia.org">
<meta name="designer" content="Stas">
<meta name="publisher" content="Stas-Webmedia.org">
<meta name="revisit-After" content="5 days">
<meta name="distribution" content="global">
<title>Stas - Webmedia.org - Professionelles WebDesign & WebCoding seit 2007</title>
<link href="_stylesheet.css" rel="stylesheet" type="text/css" />
<link href="contentslider.css" rel="stylesheet" type="text/css" />
<script src="contentslider.js" type="text/javascript"></script>
</head>
<body>
<div id="main">
<div id="top"><!-- TOP SCHEIN --></div>
<div id="page">
<!-- TOPHEADER - ANFANG-->
  <div id="topheader_left"></div>
  <div id="topheader_right">
    <div id="uhr"><? include("includes/uhr.php"); ?></div>
  </div>
  <div class="clear"></div>
<!-- TOPHEADER - ENDE-->
<div id="header"><!-- HEADER --></div>
<!-- NAVIGATION - ANFANG-->
<div id="navi">
 <div id="navi_1" align="center">
      <ul>
                <li><a href="#">LINK NAME</a></li>
                <li><a href="#">LINK NAME</a></li>
        <li><a href="#">LINK NAME</a></li>
                <li><a href="#">LINK NAME</a></li>
        <li><a href="#">LINK NAME</a></li>
                <li><a href="#">LINK NAME</a></li>
                <li><a href="#">LINK NAME</a></li>
                <li><a href="#">LINK NAME</a></li>               
                <li><a href="#">LINK NAME</a></li>               
                <li><a href="#">LINK NAME</a></li>
      </ul>
      </div>
    </div>
<div class="clear">
<!-- NAVIGATION - ENDE-->
<div id="content_puffer"><!-- COTENT_PUFFER - ANFANG -->
  <div id="content_left">
    <div id="contet_title_bg">
      <div id="contet_title_inhalt" class="bigger">Sie sind hier: News</div>
    </div>
    <div id="content"><? include("includes/news.php"); ?></div>
    <div id="footer_title_bg">
      <div id="footer_title_inhalt">&copy; 2008 - 2009 by Stas - Webmedia.org || Alle Rechte vorbehalten</div>
    </div>
  </div><!-- CONTENTLEFT - ENDE -->
  <div id="content_right">
    <div id="angebote_title_bg">
      <div id="angebote_title_inhalt" class="bigger">Meine Produkte</div>
    </div>
    <div id="angeboteinhalt">
      <div id="slider1" class="sliderwrapper">
        <div class="contentdiv">
          <? include("includes/produkt_1.php"); ?>
          </div>
        <div class="contentdiv">
          <? include("includes/produkt_2.php"); ?>
        </div>
        <div class="contentdiv">
          <? include("includes/produkt_3.php"); ?>
        </div>
      </div>
    </div>
    <div id="paginate-slider1" class="pagination"></div>
          <script type="text/javascript">

featuredcontentslider.init({
        id: "slider1",  //id of main slider DIV
        contentsource: ["inline", ""],  //Valid values: ["inline", ""] or ["ajax", "path_to_file"]
        toc: "#increment",  //Valid values: "#increment", "markup", ["label1", "label2", etc]
        nextprev: ["", ""],  //labels for "prev" and "next" links. Set to "" to hide.
        revealtype: "click", //Behavior of pagination links to reveal the slides: "click" or "mouseover"
        enablefade: [true, 0.2],  //[true/false, fadedegree]
        autorotate: [true, 3000],  //[true/false, pausetime]
        onChange: function(previndex, curindex){  //event handler fired whenever script changes slide
                //previndex holds index of last slide viewed b4 current (1=1st slide, 2nd=2nd etc)
                //curindex holds index of currently shown slide (1=1st slide, 2nd=2nd etc)
        }
})

</script>
<div style="height:3px;"></div>
<div id="rechts_title_bg">
      <div id="rechts_title_inhalt" class="bigger">Meine Sponsoren</div>
</div>
    <div id="rechtsinhalt_1" align="center"><? include("includes/partner.php"); ?></div>
</div><!-- CONTENTRIGHT - ENDE -->
  <div class="clear"></div>
</div><!-- COTENT_PUFFER - ENDE-->
</div>
<div id="bottom"><!-- BOTTOM SCHEIN --></div>
</div>
</div>
</body>
</html>

Code:

/* Layout by Stas */

body {
    font-family: Tahoma;
    font-size: 10px;
        color:#000000;
        background-color:#2c2f2f;
        margin: 0px;
}

#main {
width: 905px;
height:auto;
margin:auto;
}

#page {
width: 905px;
height:auto;
}

#top {
width: 905px;
height: 56px;
background-image:url(style/2.jpg);
background-repeat:no-repeat;
}

#bottom {
width: 905px;
height: 50px;
background-image:url(style/10.jpg);
background-repeat:no-repeat;
}

#topheader_left {
width: 648px;
height: 21px;
background-image:url(style/4.jpg);
background-repeat:no-repeat;
float:left;
}

#topheader_right {
width: 257px;
height: 21px;
background-image:url(style/5.jpg);
background-repeat:no-repeat;
float:right;
}

#uhr {
padding-top: 5px;
margin:auto;
}

#header {
width: 905px;
height: 108px;
background-image:url(style/6.jpg);
background-repeat:no-repeat;
}

#navi {
width: 905px;
height: 20px;
background-image:url(style/7.jpg);
background-repeat:no-repeat;
margin:auto;
}

#navi ul{
padding:0px;
margin:0px;
list-style:none;
display:block;
}

#navi li {
padding:0px;
margin:0px;
float: left;
display:inline;
}

#navi a, #navi a:visited, #navi a:active {
color:#000000;
display:block;
width: 83px;
height: 20px;
text-decoration: none;
line-height: 20px;
background:none;
}

#navi li a:hover {
color:#0066FF;
background-image:url(style/navi_bg.jpg);
background-repeat:no-repeat;
}

#navi_1 {
padding-left: 17px;
}

#content_puffer {
width: 905px;
height:auto;
margin:auto;
background-image:url(style/8.jpg);
background-repeat:repeat-y;
}

#content_left {
float:left;
background:none;
height:auto;
width: 652px;
}

#content_right {
float:right;
background:none;
height:auto;
width: 253px;
}

#contet_title_bg {
background-image:url(style/content_title_bg.jpg);
background-repeat:no-repeat;
width: 651px;
height: 29px;
margin:auto;
}

#contet_title_inhalt {
padding-top: 8px;
padding-left: 12px;
}

#content {
margin-top: 8px;
margin-left: 8px;
margin-right: 8px;
}

#angebote_title_bg {
background-image:url(style/right_title_bg.jpg);
background-repeat:no-repeat;
width: 250px;
height: 29px;
margin-left: 2px;
}

#angebote_title_inhalt {
padding-top: 8px;
padding-left: 12px;
}

#angeboteinhalt {
background:none;
width: 250px;
margin-left: 2px;
}

#rechts_title_bg {
background-image:url(style/right_title_bg.jpg);
background-repeat:no-repeat;
width: 250px;
height: 29px;
margin-left: 2px;
}

#rechts_title_inhalt {
padding-top: 8px;
padding-left: 12px;
}

#rechtsinhalt {
width: 250px;
margin-left: 2px;
line-height: 5px;
}

#footer_title_bg {
background-image:url(style/content_title_bg.jpg);
background-repeat:no-repeat;
width: 651px;
height: 29px;
margin:auto;
}

#footer_title_inhalt {
padding-top: 8px;
padding-left: 12px;
}

.clear {
clear:both;
}

.bigger {
font-size: 11px;
}


Non3 10.07.2008 11:35

@joker66

Code:

#subnavi {
background-image:url(../img/kontakt_below.jpg);
background-repeat:no-repeat;
border:0px solid green;
float:right;
height:330px;
margin:10px 0pt 0pt;
padding:0pt;
text-align:left;
width:175px;
}

floate doch das mal nach rechts, eventuell löst es das Problem schon. Mit Firebug hat es sich nur minimal verschoben, eventuell ist es im IE dann auch passend, habs nun nicht getestet.

@Stas

Kann kein Fehler feststellen, zumindest FF3 und IE7 sehen gleich aus

gernegross 10.07.2008 11:48

Zitat:

Zitat von Stas (Beitrag 393157)
Dieses Problem hab ich leider auch.
Ist meine 2. CSS Anpasung ... daher auch noch kein Pro.

Bitte um Hilfe: Stas - Webmedia.org - Professionelles WebDesign & WebCoding seit 2007

Die rechte Box fängt im IE da an,
wo die linke aufhört.

Hi,

ändere mal die ID #content_right so:

Code:

#content_right {
background:none;
height:auto;
margin-left:652px;
}

Das Problem liegt an der Pixel genauen Ausrichtung deines Layouts, der IE weicht bei der Darstellung meist um paar Pixel ab und wenn man es auf Pixel genau macht kommt sowas bei raus.

Dadruch das das rechte DIV kein float und keine Breite hat, nimmt es sich den restlich zur Verfügung stehenden Platz.

Es wäre auch von Vorteil wenn alle Breitenangaben der DIV's in #content_right verschwinden, die nicht zwingend erforderlich sind.

Wenn es im IE trotzdem noch runter Rutscht, dann setzt den werd von margin-left und paar Pixel hoch, dann siehst auch warum ich geschrieben habe du sollst die Breitenangaben rausnehmen.

Gruss
Ronny

EvT 10.07.2008 12:03

Stas, auch wenn du das selbe Problem wie der Threadstarter zu haben glaubst, dann mach bitte einen eigenen Thread auf. Sich an einen noch ungelösten Thread dranzuhängen ist etwas unfair und außerdem wird der Thread schnell für die Leser und auch für die Antwortenden unübersichtlich.

Stas 10.07.2008 12:25

Ok, werd ich mal versuchen, thx

Zitat:

Zitat von EvT (Beitrag 393166)
Stas, auch wenn du das selbe Problem wie der Threadstarter zu haben glaubst, dann mach bitte einen eigenen Thread auf. Sich an einen noch ungelösten Thread dranzuhängen ist etwas unfair und außerdem wird der Thread schnell für die Leser und auch für die Antwortenden unübersichtlich.

Sry, aber in anderen Foren kriegt man immer Anschiss,
man sollte die SuFu benutzen,
oder "Guck mal einen Thread runter, der hat das gleiche Problem" ... etc..
thx trotzdem.


Alle Zeitangaben in WEZ +2. Es ist jetzt 03:10 Uhr.

Powered by vBulletin® Version 3.8.11 (Deutsch)
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

© Dirk H. 2003 - 2023