Hallo zusammen,
Ich habe ein Layout erstellt, bei dem ein Header aus zwei Grafiken besteht, die eine feste Breite haben und ganz rechts bzw. links angeordnet sein sollen. Der Freiraum dazwischen soll (wenn er aufgrund der Fensterbreite vorhanden ist) den restlichen Raum mit einer einheitlichen Farbe füllen. Das funktioniert auch in allen Browsern, nur im IE nicht... Dort werden die Div-Boxen einfach nebeneinander dargestellt und rutschen teilweise in die nächste Zeile. Außerdem schließen sie nicht aneinander an sondern haben einen weißen Rand.
Anbei HTML&CSS Code der Seite. Hat jemand eine Idee, wo das Problem liegen könnte?
HTML-Code:
<body>
<div id="outer">
<div id="header">
<div id="head_left">
<img src="res/header_left.jpg" />
</div>
<div id="head_right">
<img src="res/header_right.jpg" />
</div>
<div id="head_center"></div>
</div>
<div id="menu_wrap">
<div id="menup">
<ul class="menu">
<li><a href="#">Ebene1 Punkt1</a></li>
<li onmouseover="show(this)" onmouseout="hide(this)" >
<a href="#">Ebene1 Punkt2</a>
<ul class="submenu" onmouseover="show(this)" onmouseout="hide(this)" >
<li><a href="#">Ebene2 Punkt1</a></li>
<li><a href="#">Ebene2 Punkt2</a></li>
<li class="active"><a href="#">Ebene2 Punkt3</a></li>
</ul>
</li>
<li><a href="#">Ebene1 Punkt3</a></li>
<li><a href="#">Ebene1 Punkt4</a></li>
</ul>
</div>
<div id="menulang">Sprachauswahl</div>
<div id="menu_center"></div>
</div> <!-- Ende menu_wrap -->
<div id="border">
rechter Rand
</div>
<div id="content" align="left">
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
Lorem ipsum dolor sit amet,...
</td>
</tr>
</table>
</div>
</div>
<div id="footer">
<img src="res/footer.jpg" height="113" width="100%" />
</div>
</body>
CSS:
Code:
@charset "UTF-8";
/* CSS Document */
* {
margin:0;
padding:0
}
html, body {
height:100%;/* needed to base 100% height on something known*/
text-align:left;
font-family:Verdana, Geneva, sans-serif;
font-size:15px;
}
#outer {
width:100%;
min-width:1000px;
background:#ffffff;
float:left;
margin:auto;
min-height:100%;
margin-top:-113px;/*footer height - this drags the outer -113px up through the top of the monitor */
text-align:left;
}
* html #outer {
height:100%
}
#header {
border-top:113px solid #fff; /* soak up negative margin and allows header to start at top of page*/
width:100%;
min-width:1000px;
}
#head_left {
float:left;
width:500px;
}
#head_center {
height:120px;
background-color:#285a98;
}
#head_right {
float:right;
width:500px;
}
#menu_wrap {
width:100%;
min-width:1000px;
z-index:2;
}
#menup {
float:left;
z-index:2;
}
#menulang {
float:right;
margin-right:30px;
z-index:2;
}
#menu_center {
height:1.7em;
background-color:#285a98;
z-index:2;
}
#content {
clear:left;
width:100%;
max-width:720px;
padding-left:20px;
margin-left:20px;
margin-top:10px;
z-index:3;
}
#border {
float:right;
width:210px;
margin-left:10px;
margin-right:10px;
margin-top:10px;
}
#footer {/* footer now sits at bottom of window*/
float:left;
width:100%;
min-width:1000px;
margin:auto;
height:113px;/* must match negative margin of #outer */
clear:both;
}
/*Opera Fix*/
body:before {
content:"";
height:100%;
float:left;
width:0;
margin-top:-32767px;
}
h1, h2 {
font-size:18px;
color:#285a98;
}
p {
padding-bottom:10px;
}
h1, h2, h3, h4, h5, h6, label{
font-size:18px;
color:#285a98;
}
#outer:after {/*instead of using display table for ie8*/
clear:both;
display:block;
height:1%;
content:" ";
}
a {
text-decoration:none;
}
/* MENU */
ul.menu, ul.menu ul {
list-style-type: none;
}
ul.menu a {
display: block;
padding: 1px 10px 3px 10px;
color: #FFFFFF;
font-weight:normal;
}
ul.menu ul a {
padding: 0px 10px 3px 10px;
}
ul.menu li {
padding:0;
margin:0;
background-image: none;
background-color: #285a98; /* bg color level 1 */
float:left;
border:1px solid #006;
}
ul.menu ul {
margin-left:0;
padding: 0 0 0 0;
position: absolute;
background-color: #285a98;
border:1px solid #006;
display:none;
min-width:180px;
}
/* IE-Hack f�r die Breite */
*html ul.menu ul {
width:180px;
}
ul.menu ul.hover, ul.menu li.hover ul, ul.menu li:hover ul {
display:block;
}
ul.menu ul li {
float:none;
background-color: transparent;
}
Viele Grüße,
Sebastian