Herzlich willkommen im Archiv vom ABAKUS Online Marketing Forum
Du befindest Dich im Archiv vom ABAKUS Online Marketing Forum. Hier kannst Du Dich für das Forum mit den aktuellen Beiträgen registrieren.
Code: Alles auswählen
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Test</title>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td class="dot">.</td><td width="600"><div id="1" style="position:relative; border: 1px solid black;">
<div id="2" style="position:absolute; top:100px; left:100px; width:20px; border: 1px solid black;">
con ten t con ten t con ten t con ten t con ten t con ten t con ten t con ten t con ten t con ten t con ten t con ten t
</div>
</div></td><td class="dot">.</td></tr></table>
</body>
</html>
Wenn man das position:relative; entfernt, positioniert sich div 2 nicht mehr zentriert ausgehend vom umliegenden element (hier div 1) sondern ausgehen vom body, somit ist die zentrierung futsch.@Maschenke "Sobald man bei div 1 das position:relative entfernt, zeigt auch der IE einen Scrollbalken an, gibt es von daher vielleicht eine andere Möglichkeit zur passenden Formatierung?"
Code: Alles auswählen
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Test</title>
</head>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0"><tr><td class="dot">.</td><td width="600" style="position:relative;">
<div id="2" style="position:absolute; top:100px; left:100px; width:20px; border: 1px solid black;">
con ten t con ten t con ten t con ten t con ten t con ten t con ten t con ten t con ten t con ten t con ten t con ten t
</div>
</td><td class="dot">.</td></tr></table>
</body>
</html>
Code: Alles auswählen
...
<div style="margin-top: 100px; margin-left: 100px; width: 20px; border: 1px solid black">
lorem ipsum
</div>
...