Hallo,
auch, wenn das hier nicht das Spezialforum für solche Fragen ist - ich wage es einfach mal.
Ich habe folgende Testseite, bei der der IE versagt (Pre geht trotz display:table; immer über die ganze Breite). Nun möchte ich nicht mit width arbeiten, sondern hoffe auf einen Trick, der den IE 6.0 überzeugt, nur den nötigen Bereich einzufärben (wie er es bei einer Tabelle machen würde):
HTML
<?xml version='1.0' encoding='ISO-8859-1'?>
<!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">
<head>
<title>
Pre-Testseite
</title>
<style type="text/css">
/*<![CDATA[*/
pre.t {
background-color: #f2f2f2;
border: 2px dotted #a4a4a4;
color: #000000;
display: table;
font-family: "Courier New", Courier, Fixedsys, monospace;
margin: 0px;
padding: 2px 6px;
}
pre {
background-color: #f2f2f2;
border: 2px dotted #a4a4a4;
color: #000000;
font-family: "Courier New", Courier, Fixedsys, monospace;
margin: 0px;
padding: 2px 6px;
}
/*]]>*/
</style>
</head>
<body>
<p>
So soll es im Internet Explorer und im Firefox aussehen. Der Firefox schafft's, IE natürlich nicht:
</p>
<pre class="t">
=Abs(Summe(Feld="1"))
</pre>
<p>
So sieht's im Internet Explorer aus (also kein Unterschied):
</p>
<pre>
=Abs(Summe(Feld="1"))
</pre>
</body>
</html>
Alles anzeigen
Vielen Dank für eure Antworten!
Viele Grüße,
Arne