- Код: Выделить всё
* {
margin: 0;
padding: 0;
}
.errorDiv {
width: 350px;
position: absolute;
top: 10%;
left: 50%;
margin-left: -175px;
background-color: white;
border: #3C7CBB 2px solid;
z-index: 2;
}
.top_bg {
height: 31px;
background: #f00;
}
.small_left {
width: 100%;
height: 31px;
float: left;
background: #f00;
cursor: move;
}
.small_left span {
display: block;
float: left;
margin-top: 5px;
margin-left: 10px;
color: #FFFFFF;
font: bold 16px Tahoma, Arial, sans-serif;
}
.small_left a {
display: block;
float: right;
margin-right: 10px;
border: none;
}
.small_left img {
border: none;
}
.warning_img {
float: left;
background: #3c3c3c;
}
.warning_text {
float: left;
}
.clear {
clear: both;
}
И HTML:
- Код: Выделить всё
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<link rel="stylesheet" type="text/css" href="main.css" />
</head>
<body>
<div class="errorDiv" id="errorDiv2">
<div class="top_bg">
<div class="small_left">
<span>Сообщение об ошибке</span>
<a href="#">
X
</a>
</div>
</div>
<div class="clear"></div>
<div class="warning_img">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas at quam. Curabitur tincidunt.
</div>
<div class="warning_text">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas at quam. Curabitur tincidunt.
</div>
</div>
</body>
</html>
Темный и белый дивы должны стоять рядом. В IE все как и положено, в Мозилле один стоит под другим. Что я делаю не так???
UPD: нет, и в ИЕ тоже один под другим...