carp: Firefox ignoriert "style" Attribut

Moinmoin,

ich bin am Ende; Mein Firefox (und div. andere) weigern sich, ein style=".." Attribut in HTML Element auszuwerten. Das (x)HTML Dokument ist sowas von konform, daran kann es nicht liegen. Weiterhin kurios ist, dass das über <link rel=...> eingebundene CSS sauber eingebunden wird. Der IE erkennt alles sauber gemäß der Style-Angaben.

Woran kann es liegen? Für jedwede Idee bin ich sehr dankbar.

-Carsten

Beispiel HTML:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Style-Type" content="text/html"/>
<link rel="stylesheet" type="text/css" href="styles.css"/>
<title>Titel</title>
</head>
<body style="background-color:magenta">
 <h1>Heading</h1>

<form method="post" action="form.php">
 <p>
 <input type="hidden" name="subaction" value="edit_az"/>
 <textarea cols="100" rows="10"
 style="background-color:red;font-family:sans-serif;border-style:1px solid blue;color:yellow:visibility:hidden">
 </textarea>
 </p>
 <div style="visibility:hidden;display:none">
<p>Foo</p>
</div>
 </form>
</body>
</html>

  1. Hi,

    Das (x)HTML Dokument ist sowas von konform, daran kann es nicht liegen.

    dann liegt es vielleicht daran, dass der CSS-Code sowas von unkonform ist, dass es daran liegen kann? Suche den Pixel ... ;-)

    Cheatah

    --
    X-Self-Code: sh:( fo:} ch:~ rl:° br:> n4:& ie:% mo:) va:) de:] zu:) fl:{ ss:) ls:~ js:|
    X-Self-Code-Url: http://emmanuel.dammerer.at/selfcode.html
    X-Will-Answer-Email: No
    X-Please-Search-Archive-First: Absolutely Yes
    1. Hi,

      dann liegt es vielleicht daran, dass der CSS-Code sowas von unkonform ist, dass es daran liegen kann? Suche den Pixel ... ;-)

      Stimmt, der in den style-Attributen vorhandene CSS-Code ist aber auch sowas von unkonform zu text/html ... ;-)

      cu,
      Andreas

      --
      Warum nennt sich Andreas hier MudGuard?
      Schreinerei Waechter
      Fachfragen per E-Mail halte ich für unverschämt und werde entsprechende E-Mails nicht beantworten. Für Fachfragen ist das Forum da.
  2. Hi,

    <meta http-equiv="Content-Style-Type" content="text/html"/>

    Firefox kennt einfach den verwendeten Mime-Type für's style-Attribut nicht wirklich.
    HTML = Struktur, CSS = Darstellung.
    Warum Du jetzt ausgerechnet auf die Idee kommst, HTML für die Darstellung vorzusehen ...

    cu,
    Andreas

    --
    Warum nennt sich Andreas hier MudGuard?
    Schreinerei Waechter
    Fachfragen per E-Mail halte ich für unverschämt und werde entsprechende E-Mails nicht beantworten. Für Fachfragen ist das Forum da.
  3. Hallo carp,

    style="background-color:red;font-family:sans-serif;border-style:1px solid blue;color:yellow:visibility:hidden">

    Der Fehler liegt in dieser Zeile ;-) Zähle nochmal Punkte und Semikolons durch.

    Gruß aus Köln-Ehrenfeld,

    Elya

    --
  4. Hi,

    Werden alle style-Attribute ignoriert? In dem hier ist auf jeden Fall ein Fehler drin. (hinter yellow) ;-)

    style="background-color:red;font-family:sans-serif;border-style:1px solid blue;color:yellow:visibility:hidden">

    Gruß,
    Onkel Schnitzel

  5. Hallo Carsten

    Wenn du experimentieren möchtest, dann mache es doch so:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <meta http-equiv="Content-Style-Type" content="text/html"/>
    <link rel="stylesheet" type="text/css" href="styles.css"/>

    <style type="text/css">
    .textarea   { background-color:red;
                  font-family:sans-serif;
                  border-style:1px solid blue;
                  color:yellow;
                  visibility:hidden}
    .specialDiv { visibility:hidden;
                  display:none
                }
    </style>

    <title>Titel</title>
    </head>
    <body style="background-color:magenta">
     <h1>Heading</h1>
     <form method="post" action="form.php">
     <p>
     <input type="hidden" name="subaction" value="edit_az"/>
     <textarea cols="100" rows="10"
     style="">
     </textarea class="textarea">
     </p>
     <div class="specialDiv">
    <p>Foo</p>
    </div>
     </form>
    </body>
    </html>

    Dann kannst du das CSS auch ggf. in den Validator packen und - so du fertig bist - gleich in die CSS-Datei.

    Herzliche Grüße
    Wolfgang