Ankündigung

Einklappen
Keine Ankündigung bisher.

Internet Explorer stellt Css nicht dar.

Einklappen

Neue Werbung 2019

Einklappen
X
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • Internet Explorer stellt Css nicht dar.

    Hallo mit einander, ich hab ein grosses Problem. Meine Webseite wird in Chrom und Firefox richtig dargestellt aber im Internet Explorer nicht:/
    Weiss einer an was es liegt? Hab jetzt schon Stunden damit verbracht eine Lösung zu finden, aber Google bringt mich nicht weiter:/

    Hier mal mein Script.

    Schon jetzt bedanke ich mich für euer Antworten

    PHP-Code:

    <?php

    include("includes/language.php");

    include(
    "lang/".$lang_file);




         
    ?>




    <php>




     <head>

          <title>Onlineshop</title>

        <meta property="og:url"           content="http://www.onlineshop.com" />
        <meta property="og:type"          content="website" />
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta http-equiv="X-UA-Compatible" content="IE=8" />
        <meta charset="UTF-8">


        <link href="css/stylestartseite.css" type=" text/css" rel="stylesheet">

        <link href="css/menubar.css" type=" text/css" rel="stylesheet">

        <link href="css/Inhalt.css" type=" text/css" rel="stylesheet">

        <link href="css/Men.css" type=" text/css" rel="stylesheet">


        </head>

        <body id="body">

      <div id="header">



        </div>


    <div id="menubar">



        <table class="MenubarTable1">

              <tr>




          <td class="MenubarTd1"><a href="Men.php" class="menubarlink2">Men</a></td>
            <td class="MenubarTd1"><a href="Women.php" class="menubarlink2">Women</a></td>
            <td class="MenubarTd1"><a href="Gallery.php" class="menubarlink2">Gallery</a></td>
            <td class="MenubarTd1"><a href="Login.php" class="menubarlink2">Login</a></td>
            <td class="MenubarTd2"></td>
            <td class="MenubarSchrift1"><a href="startseite.php" class="menubarlink1" >Onlineshop</td>
            <td class="MenubarTd3"></td>

            </tr>   

        </table>



        </div>


            <div id="Logofix">

            <div class="Logofix">
        <table class="LogofixTable1">

            <tr>

                <td class="LogofixTd1"></td>
            <td class="LogofixTd2"><a href="#" class="Logofixlink1" >Onlineshop</td>
            <td class="LogofixTd3"></td>

            </tr>
            </table>


        </div>

            </div>





       <div id="ShopMen">


        <div class="ShopMenInhalt">


            <!-----------------------------------------------Titel Men Shop -------------------------------------------->

           <table class="ShopMenTable1">

            <tr>

               <td class="ShopMenTitel1">Men</td>


               </tr>

            </table>

             <table class="ShopMenAbstand1"><tr><td></td></tr></table>

          <!-----------------------------------------------Inhalt Men Shop -------------------------------------------->   







            <!------------Men Shop Produktspalte1 ------------>

            <div class="ShopMenProduktspalte1">


                <table class="ShopMenTable0">


                <tr>


                    <td class="ShopMenTd0">


                <table class="ShopMenTable2">


                    <tr>

                        <td class="ShopMenTd1"><a href="InfinityBlack.php"><img  class="ShopMenImg1" src="productimage/t-shirt%20test.jpg" /></a></td>   



                    </tr>

                    <tr>


                        <td class="ShopMenTd2"> Black Edition Shirt</td>


                    </tr>



                    <tr>

                        <td class="ShopMenTd3"> 22Fr</td>




                    </tr>


                </table>


                </td>











                      <td class="ShopMenTd0">


                <table class="ShopMenTable2">


                    <tr>

                        <td class="ShopMenTd1"><a href="InfinityBlack.php"><img  class="ShopMenImg1" src="productimage/t-shirt%20test.jpg" /></a></td>   



                    </tr>

                    <tr>


                        <td class="ShopMenTd2"> Black Edition Shirt</td>


                    </tr>



                    <tr>

                        <td class="ShopMenTd3"> 22Fr</td>




                    </tr>


                </table>


                </td>




                   <td class="ShopMenTd0">


                <table class="ShopMenTable2">


                    <tr>

                        <td class="ShopMenTd1"><a href="InfinityBlack.php"><img  class="ShopMenImg1" src="productimage/t-shirt%20test.jpg" /></a></td>   



                    </tr>

                    <tr>


                        <td class="ShopMenTd2"> Black Edition Shirt</td>


                    </tr>



                    <tr>

                        <td class="ShopMenTd3"> 22Fr</td>




                    </tr>


                </table>


                </td>




             <td class="ShopMenTd0">


                <table class="ShopMenTable2">


                    <tr>

                        <td class="ShopMenTd1"><a href="InfinityBlack.php"><img  class="ShopMenImg1" src="productimage/t-shirt%20test.jpg" /></a></td>   



                    </tr>

                    <tr>


                        <td class="ShopMenTd2">Black Edition Shirt</td>


                    </tr>



                    <tr>

                        <td class="ShopMenTd3"> 22Fr</td>




                    </tr>


                </table>


                </td>






                    </tr>






                    </table>






            </div>











           </div>




         <div id="footer">

        <?php include("includes/footer.php");


            
    ?>


        </div>

            </div>




        </body>

    </php>

  • #2
    PHP-Code ist dafür uninteressant. Für den Browser zählt nur HTML- und CSS-Code.

    Du solltest die Seite mit dem W3C-Validator prüfen und alle aufgezeigten Fehler beseitigen:

    https://validator.w3.org/

    Kommentar


    • #3
      Vielen Dank Hab ich heute schon mal gemacht aber nun zeigt es viel Mehr Fehler an die mir aber warscheindlich auch weiter helfen.

      Aber was die alles bedeuten muss ich erst mal heerausfinden


      Code:
      1. Error: Element head is missing a required instance of child element title. From line 3, column 16; to line 5, column 5 TYPE html>↩↩<php>↩ ↩ Content model for element head: If the document is an iframe srcdoc document or if title information is available from a higher-level protocol: Zero or more elements of metadata content, of which no more than one is a title element and no more than one is a base element. Otherwise: One or more elements of metadata content, of which exactly one is a title element and no more than one is a base element.
      2. Error: Element php not allowed as child of element body in this context. (Suppressing further errors from this subtree.) From line 3, column 16; to line 5, column 5 TYPE html>↩↩<php>↩ ↩ Content model for element body: Flow content.
      3. Error: Stray start tag head. From line 10, column 2; to line 10, column 7 ↩ ↩ <head>↩ ↩
      4. Warning: Consider avoiding viewport values that prevent users from resizing documents. From line 16, column 5; to line 16, column 90 e" />↩ <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">↩ <
      5. Error: A meta element with an http-equiv attribute whose value is X-UA-Compatible must have a content attribute with the value IE=edge. From line 17, column 5; to line 17, column 56 =no">↩ <meta http-equiv="X-UA-Compatible" content="IE=8" />↩ <
      6. Error: Stray end tag head. From line 30, column 5; to line 30, column 11 ↩ </head>↩ ↩
      7. Error: Start tag body seen but an element of the same type was already open. From line 32, column 5; to line 32, column 20 ↩ ↩ <body id="body">↩ ↩
      8. Fatal Error: Cannot recover after last error. Any further errors will be ignored. From line 32, column 5; to line 32, column 20 ↩ ↩ <body id="body">↩ ↩

      Kommentar


      • #4
        Die ganzen Hinweise, Fehlermeldungen musst Du schon alleine durcharbeiten.

        Wenn Du sagst, die Darstellung im IE ist nicht OK, wäre eigentlich immer die Frage in welcher IE Version.

        Ich sehe, dass Du eine IE 8 Kompatibilitätsanweisung gesetzt hast, die, soweit ich weiß, den IE anweist, die Seite als IE 8 zu interpretieren. Na und der ist ja nun nicht mehr ganz auf dem Stand der Technik. Der Spuk könnte also schon vorbei sein, wenn Du das raus nimmst.
        [B]Es ist schon alles gesagt. Nur noch nicht von allen.[/B]

        Kommentar


        • #5
          Zitat von drsoong Beitrag anzeigen
          Ich sehe, dass Du eine IE 8 Kompatibilitätsanweisung gesetzt hast, die, soweit ich weiß, den IE anweist, die Seite als IE 8 zu interpretieren. Na und der ist ja nun nicht mehr ganz auf dem Stand der Technik. Der Spuk könnte also schon vorbei sein, wenn Du das raus nimmst.
          Oder auf den Wert 'IE=Edge' stellen. Somit wird der IE angewiesen immer die neuste verfügbare Engine zu benutzen. Im Intranet tut der IE gerne mal mit einer älteren Engine an die Seiten ran gehen als eigentlich verfügbar ist.

          HTML-Code:
          <meta http-equiv="X-UA-Compatible" content="IE=Edge" />

          Kommentar


          • #6
            Zitat von drsoong Beitrag anzeigen

            Ich sehe, dass Du eine IE 8 Kompatibilitätsanweisung gesetzt hast, die, soweit ich weiß, den IE anweist, die Seite als IE 8 zu interpretieren. Na und der ist ja nun nicht mehr ganz auf dem Stand der Technik. Der Spuk könnte also schon vorbei sein, wenn Du das raus nimmst.
            Hab ich zuerst auch gehabt und dann habe ich auch das mit dem IE=Edge versucht aber keins von den 3 Varianten geht. Ich schaue heute Abend die Fehlermeldungen genauer an, weil es könnte vielleicht daran liegen wie die css Datei ein gelesen wird.

            Kommentar


            • #7
              Ich würde einfach sagen es liegt - siehe Fehlerprotokoll oben - daran das du invlalides HTML auslieferst. Dann ist es auch klar das es nicht sauber ankommt, weil halt die Browser auch unterschiedlich dann mit Fehler umgehen. Wenn etwas nicht richtig aussieht, ist der erste Schritt mal die Ausgabe zu validieren - sprich schauen das man valides HTML ausliefert. Auf Basis von "Mist" debuggen ist meist nicht sehr zielführend.

              Und das hat nichts mit PHP zu tun.

              [MOD: Verschoben von PHP-Einsteiger]
              The string "()()" is not palindrom but the String "())(" is.

              Debugging: Finde DEINE Fehler selbst! | Gegen Probleme beim E-Mail-Versand | Sicheres Passwort-Hashing | Includes niemals ohne __DIR__
              PHP.de Wissenssammlung | Kein Support per PN

              Kommentar


              • #8
                Was soll eigentlich <php> sein? HTML kennt dieses Element jedenfalls nicht. Wo hast Du das denn her?

                Kommentar


                • #9
                  Also irgend wie gehts immer noch nicht, auch wenn ich den Style direkt in die Seite einbinde one href, hab auch <php> zu <html> gewechselt und
                  <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> eingefügt

                  Kommentar


                  • #10
                    Zeige mal einen Link zu der Seite die du bis jetzt hast. du kannst die Seite auch auf einem der zahlreichen Freewebhoster einstellen, falls dir das lieber ist.

                    Kommentar


                    • #11
                      Also ich habs raus gefunden, es liegt wie immer in Detail.

                      Der Fehler war, dass ich <link href="css/menubar.css" type=" text/css" rel="stylesheet"> statt <link rel="stylesheet" href="css/menubar.css" type="text/css"> geschrieben habe.

                      Kommentar

                      Lädt...
                      X