11
Mit dem Code, den du oben gepostet hast, kann ich den Fehler nicht reproduzieren - wenn margin auf 0 gesetzt ist, sind die Abstände beim IE, Firefox und Opera gleich
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Myrkwid.net</title>
<meta name="author" content="Henning Schwab">
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
<link rel="stylesheet" type="text/css" href="layout.css">
<link rel="SHORTCUT ICON" href="11.ico">
</head>
<body>
<div id="all">
<div id="head">
<h1>Head</h1>
</div><div id="top">
<p style="text-align:left; float:left;">
Sie sind der 5. Besucher dieser Seite.
</p>
<p style="text-align:right; font-family:arial; font-size:10pt;">
Di, 02.05.2006-17:50
</p>
</div><div id='navi'><p class='menutitle'>Navigation</p>
<a class='menu' href='?id=1&c=news&offset=0&'>Seite</a>
<a class='u-menu' href='?id=1&c=news&offset=0&'>⇒Meldungen</a>
<a class='u-menu' href='?id=1&c=gb&offset=0&'>⇒Gästebuch</a>
<a class='menu' href='?id=2&c=news&offset=0&'>Link</a>
</div> <div id="right">
<div id='menu'>
<p class='menutitle'>Entwicklungsblog</p>
<a class='menu' href='?id=1'>blub</a>
<a class='menu' href='?id=2'>blub</a>
<a class='menu' href='#'>blub</a>
</div>
</div><div id="content">
<h2>Meldungen</h2>
<div class='newshead'>
neuster artikel
</div>
<div class='newsbody'>
text
</div>
<div class='newstail'>
<p class='date'>
26.04.2006-20:07</p>
<p class='comment'>
<a href='?id=1&c=comment&offset=13'>Kommentare</a>
</p>
<div>
</div>
</div>
<div class='newshead'>
ads
</div>
<div class='newsbody'>
asssd
</div>
<div class='newstail'>
<p class='date'>
24.04.2006-22:48</p>
<p class='comment'>
<a href='?id=1&c=comment&offset=12'>Kommentare</a>
</p>
<div>
</div>
</div>
<div class='newshead'>
dfg
</div>
<div class='newsbody'>
dfg
</div>
<div class='newstail'>
<p class='date'>
24.04.2006-22:48</p>
<p class='comment'>
<a href='?id=1&c=comment&offset=11'>Kommentare</a>
</p>
<div>
</div>
</div>
<div class='newshead'>
asd
</div>
<div class='newsbody'>
asd
</div>
<div class='newstail'>
<p class='date'>
24.04.2006-21:28</p>
<p class='comment'>
<a href='?id=1&c=comment&offset=10'>Kommentare</a>
</p>
<div>
</div>
</div>
<div class='newshead'>
asd
</div>
<div class='newsbody'>
asd
</div>
<div class='newstail'>
<p class='date'>
24.04.2006-21:28</p>
<p class='comment'>
<a href='?id=1&c=comment&offset=9'>Kommentare</a>
</p>
<div>
</div>
</div>
<div id='pagecount'><a class='' href='?id=1&c=news&offset=5&'>Ältere Meldungen im Archiv</a>
</div></div><div id="notice">
<p style="float:right"><a style="text-align:right; background-color:#000000;" target="_blank" href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-html401" alt="Valid HTML 4.01 Transitional" border="0" height="31" width="88"></a></p>
<p style="float:left">Optimiert für <img src="ff.png" width="20" height="19" border="0" alt=""> Firefox 1.5.0.* und 1024x768. ©2006 by H.Schwab(Isildur).</p>
<p><a style="text-align:right; background-color:#000000;" href="http://jigsaw.w3.org/css-validator/" target="_blank"><img style="border:0;width:88px;height:31px;" src="http://jigsaw.w3.org/css-validator/images/vcss" alt="Valid CSS!" ></a></p>
</div></div>
</body>
</html>
* {margin: 0; padding: 0;}
body
{
background-color:#000000;
color:#FFFFFF;
font-size:11pt;
}
h2
{
text-align:center;
font-size:1.5em;
text-decoration:underline;
}
input, textarea
{
background-color:#1F1F1F;
color:#FFFFFF;
}
a
{
display:block;
padding:0px 3px;
}
ol
{
list-style:none;
}
a:hover, a:link, a:visited, a:active
{
color:#FFFFFF;
text-decoration:none;
}
a:hover
{
text-decoration:underline;
}
/**********************************************/
/**********************************************/
/************Positionierung********************/
/**********************************************/
/**********************************************/
#all
{
margin:10px;
}
#head, #top, #notice
{
border:1px dotted #A9A9A9;
}
#navi, #content, #right
{
padding:10px;
}
#head, #top, #content
{
margin-bottom:6px;
}
#navi, #right
{
width:135px;
}
#head
{
height:100px;
width:100%;
}
#top
{
clear:both;
padding:5px;
font-weight:bold;
}
#navi
{
float:left;
}
#content
{
margin-right:165px;
margin-left:165px;
}
#right
{
float:right;
}
#notice
{
clear:both;
padding:7px;
}
#pagecount
{
height:1em;
margin:5px 0px;
}
#pagecount a
{
display:inline;
}
/**********************************************/
/**********************************************/
/*****************Class************************/
/**********************************************/
/**********************************************/
p.menutitle, a.menu, a.umenu
{
vertical-align:middle;
}
p.menutitle
{
background-color:#3F3F3F;
border:1px dotted #A9A9A9;
font-weight:bold;
font-size:12pt;
margin-top:10px;
padding:0px 5px;
}
a.menu
{
background-color:#1F1F1F;
border:1px dotted #A9A9A9;
border-top:0px;
padding:0px 5px;
}
a.u-menu
{
background-color:#1F1F1F;
border:1px dotted #A9A9A9;
border-top:0px;
padding:0px 7px;
}
div.newshead
{
background-color:#3F3F3F;
border:1px dotted #A9A9A9;
font-weight:bold;
font-size:12pt;
text-align:center;
padding:3px;
margin-top:10px;
}
div.newsbody
{
background-color:#1F1F1F;
border:1px dotted #A9A9A9;
border-top:0px;
padding:5px;
}
div.newstail
{
background-color:#2F2F2F;
border:1px dotted #A9A9A9;
border-top:0px;
text-align:right;
margin:0px;
padding:0px;
}
div.newstail div
{
clear:both;
}
p.date
{
float:right;
font-size:10pt;
}
p.comment
{
float:left;
font-size:10pt;
}
div.gbhead
{
background-color:#3F3F3F;
border:1px dotted #A9A9A9;
padding:5px;
margin-top:10px;
}
div.gbbody
{
padding:5px;
background-color:#1F1F1F;
border:1px dotted #A9A9A9;
border-top:0px;
}
div.gblist
{
width:4.4em;
text-align:right;
float:left;
margin-right:3px;
}
Der mit PHP erstelle Code ist noch etwas wirr ich muss den noch richtig formatieren mit \t&\n und das #all fliegt auchnoch raus.#navi
{
float:left;
}
div.newstail div
{
clear:both;
}
div#content h2
{
padding:6px;
}
geht alles super!Thema | Autor | Forum | Beiträge | Letzter Beitrag |
---|---|---|---|---|
Div in Div positionieren | apfelbonbon | HTML und CSS | 7 | 04.02.2011 16:19 |