IE margin Problem (mal wieder)
Thomas Behring
- css
Hallo Leute,
bitte nicht gleich aufschreien, das vermaledeite margin Problem im IE mal wieder. Aber ich habe im Forum nichts gefunden, vielleicht bin ich einfach übermüdet. Kann mir hier einer kurz sagen, warum es nicht klappt?
Die innere Tabelle mit dem Text soll bis auf 20px links und rechts an die äussere Tabelle reichen. Das tut sie im Firefox auch anstandslos. Nur im IE ragt sie rechts einfach über den Rand hinaus bzw wird dort abgeschnitten. Ich peils nicht.
Ich danke Euch,
Tom
-------------------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<title>Test</title>
<style type="text/css">
<!--
table#content
{
background-color: #666666;
height : 500px;
}
table#content table#content_header
{
background-color: #617075;
margin : 20px;
width : 100%;
}
table#content td#page_title
{
font-size : 180%;
color : #dddddd;
}
//-->
</style>
</head>
<body>
<table id="content" border="1" width="898">
<tr>
<td>
<table id="content_header" border="1">
<tr>
<td id="page_title">Text</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
------------------------------------
Hier ist noch eine aufgeräumtere Version:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head>
<title>Test</title>
<style type="text/css">
<!--
#content
{
height : 500px;
width : 950px;
}
#header
{
margin : 20px;
width : 100%;
}
//-->
</style>
</head>
<body>
<table id="content" border="1">
<tr>
<td>
<table id="header" border="1">
<tr>
<td>Text</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
Hi,
Die innere Tabelle mit dem Text soll bis auf 20px links und rechts an die äussere Tabelle reichen.
margin : 20px;
width : 100%;
also 100% + 40px.
was hast Du gegen ein Block-Element wie <h1> statt einer inneren Tabelle?
freundliche Grüße
Ingo