Hey Liebe Forumer,
ich habe ein kleines Problem.
Ich will ein Foto umranden und das mit divs:
Und mein Stylesheet:
Jetzt entstehen aber folgende Probleme:
1. Der IE gleicht das "#box"-div an die body breite an
2. Der FF weißt dem "#right"-div und dem "#left"-div eine height von 0 zu. Der IE weißt dem "#right"-div und dem "#left"-div eine height zu, aber diese ist eben immer noch nicht gleich groß, wie das "#content"-div.
Das was hier mit Farben dargestellt ist soll später noch gegen einen richtigen Rand aus background-images ersetzt werden.
LG Crashc
ich habe ein kleines Problem.
Ich will ein Foto umranden und das mit divs:
HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled</title>
<link rel="stylesheet" type="text/css" href="my.css">
</head>
<body>
<div id="box">
<div id="top">
<div id="top_left"></div>
<div id="top_right"></div>
</div>
<div id="middle">
<div id="left"></div>
<div id="right"></div>
<div id="content">hier soll einmal ein bild hin,<br />das eine belibige Größe haben soll.<br />Alle anderen Elemente sollen dieses Umschließen</div>
</div>
<div id="bottom">
<div id="bottom_left"></div>
<div id="bottom_right"></div>
</div>
</div>
</body>
</html>
Code:
* {
margin: 0;
padding: 0;
}
BODY, TD {
background-color: #4d4b4c;
padding: 50px;
}
#box {
padding: 40px;
background-color: blue;
float: left;
width: auto;
}
#top { margin-top: -40px; margin-left: -40px; margin-right: -40px; background-color: white; overflow: hidden; height: 40px;}
#top_left { height: 40px; width:40px; background-color: fuchsia; float: left; }
#top_right { height: 40px; width:40px; background-color: fuchsia; float: right; }
#bottom { margin-bottom: -40px; margin-left: -40px; margin-right: -40px; background-color: white; overflow: hidden; height: 40px;}
#bottom_left { height: 40px; width:40px; background-color: fuchsia; float: left; }
#bottom_right { height: 40px; width:40px; background-color: fuchsia; float: right; }
#left { margin-left: -40px; background-color: white; width: 40px; float: left;}
#right { margin-right: -40px; background-color: white; width: 40px; float: right;}
#content { background-color: red;}
1. Der IE gleicht das "#box"-div an die body breite an
2. Der FF weißt dem "#right"-div und dem "#left"-div eine height von 0 zu. Der IE weißt dem "#right"-div und dem "#left"-div eine height zu, aber diese ist eben immer noch nicht gleich groß, wie das "#content"-div.
Das was hier mit Farben dargestellt ist soll später noch gegen einen richtigen Rand aus background-images ersetzt werden.
LG Crashc