Ankündigung

Einklappen
Keine Ankündigung bisher.

CSS Layout macht Probleme mit Firefox

Einklappen

Neue Werbung 2019

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

  • CSS Layout macht Probleme mit Firefox

    Hallo! Also ich bin hier grad ein bisschen am rumspielen mit CSS. Habe damit so gut wie nix gemacht und sammle grad erste Erfahrungen. Ich habe es auch ungefähr so hingekriegt wie ich es haben wollte - aber leider nur mit dem IE. Der Firefox stellt es anders da. Ich weiß nicht, warum der nicht mein margin beachtet. Jedenfalls nciht für die rechte Seite!
    Also hier ist mein CSS Layout:
    Code:
    *
    {
    font-size: 12px;
    }
    
    html
    {
    height                 :100%;
    }
    
    body
    {
      color                : #FFFFFF;  
      height               :  100%;
      background           : #344566; 
      background-attachment: fixed;
      background-repeat    : no-repeat;
      background-position  : top;
      SCROLLBAR-FACE-COLOR: #cfd4d9; 
      SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; 
      SCROLLBAR-SHADOW-COLOR: ##636c75; 
      SCROLLBAR-3DLIGHT-COLOR: #666666; 
      SCROLLBAR-ARROW-COLOR: #666666; 
      SCROLLBAR-TRACK-COLOR: #BFC2CA; 
      SCROLLBAR-DARKSHADOW-COLOR: #666666;
      font-size            : 12px;
      font-family          : Times new roman,Tahoma,sans-serif; 
    }
    
    table
    {
       width: 10%;
       font-size: 12px;
       background-color: #344566;
       border-color: #415680;
       table-layout: auto;
    } 
    
    div#a
    {
    border:2px dotted #ffffff;
    background-color:#344055;
    padding:1%;
    margin: 2%;
    height: 95%;
    width: 100%;
    position:relativ;
    }
    den html selektor habe ich eingefügt, weil ich da bei irgendeinem Beispiel von CSS4YOU sowas gesehen habe.Nämlich hier: http://www.css4you.de/wslayout1/ex0002.html
    sowas will ich ja ungefähr haben und das wird auch von beiden Browsern korrekt angezeigt..dort im Quelltext habe ich das mit html gefunden.
    naja...
    meine HTML File sieht ganz einfach so aus:

    Code:
    <html>
     <head>
    <title> Quoten</title> 
      <link rel="stylesheet" type="text/css" href="formate.css">
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
     </head>
     <body>
    
    <div id="a"> 
    <table border="1" cellspacing="0" cellpadding="4">
        <tr> 
          <td> <font>hallo</font></td>
          <td> <font>2.Zelle </font></td>
        </tr>
        <tr> 
          <td> <font>2.Zeile,1.Zelle</font></td>
          <td> <font>2.Zeile,2.Zelle</font></td>
        </tr>
      </table>
    </div>
    
    </body>
    </html>
    Warum der Unterschied? Was versteht Firefox nicht?

    Gruß,
    Wimme
    ?>[/php]

  • #2
    pack dein margin mal hierein
    Code:
    html {
    margin: 2%;
    }

    Kommentar


    • #3
      das klappt.

      aber hier die beschreibung von margin:
      Erzeugt einen Abstand zu anderen Element. Außenabstände kannst du als transparenten Rand um ein Element betrachten. Dieser Rand ist transparent, um so einen Abstand zu anderen Elementen zu erzeugen.

      hmm....

      warum tut das im html und nicht beim div-Container?! Sollte es nicht anders herum sein?

      Gruß,
      Wimme

      Kommentar

      Lädt...
      X