CSS, плиз помогите

Russian
На сайте с 10.12.2005
Offline
69
676

такая ситуация. Фон страницы - не белый. Сам контейнер имеет белый фон (div). В контейнер вложен еще один div (к примеру). Подразумевается, что он должен растягивать по высоте контейнер, сохраняя белый фон. Так и происходит в IE. Но в FF он не тянется. Получается глюк:

http://bccg.com.ua/test/test.html

сравните в IE и FF.

Подскажите плиз, где я торможу :)

P.S. такая проблема при использовании float во вложенном диве, но без него никак, на самом деле предполагается две колонки внутри, это упрощенный пример.

nickspring
На сайте с 29.03.2006
Offline
228
#1

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"

"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
<!--
#container {
background-color: #FFFFFF;
width: 500px;
text-align: center;
}
#testleft {
float: left;
width: 250px;

}
.clear
{
clear:both;
}
-->
</style>
</head>

<body bgcolor="#999999" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<div id="container">

<div id="testleft">
The importance of our loan verification program (PacDex.OS. system) is crucial to the QC of Lender. This program simply verifies each loan and that you will abide by our policy. Please take notice that Pacific Bancorp and its Affiliates do not guarantee the legitimacy of any file not on the PacDex.OS. system, and that a file underwritten that is not on our PacDex.OS. system IS NOT a file that has any connection to our company. Further more, you has been notified that we do not want any file underwritten without corporate approval. At this point your compliance with our program is completely for the protection of ALL banks lenders, brokers, processors and to our borrowers. In an industry saturated with fraud it is crucial that each person doing business with us is in fact associated with our company. Pacific Bancorp Corp wants to be able to guarantee the highest quality and the incentive product to all our users, the only way that WILL happen is if its in PacDex.OS. first!

</div>
<div class="clear"></div>

</div>
</body>
</html>

Без блока с свойством clear после float-блока ничего не выйдет.

Russian
На сайте с 10.12.2005
Offline
69
#2

спасибо большое!

Kolyaj
На сайте с 28.03.2006
Offline
69
#3

Russian, вот здесь http://softwaremaniacs.org/blog/2005/12/01/css-layout-float/ почитайте про это, очень хорошо написано.

to4kaRU
На сайте с 01.09.2005
Offline
14
#4

И вот еще один способ:

http://www.positioniseverything.net/easyclearing.html

Авторизуйтесь или зарегистрируйтесь, чтобы оставить комментарий