XStream довольно хорош в сериализации объекта к XML без большого количества конфигурации и денег! (это находится под лицензией BSD).
Мы использовали его в одном из нашего проекта заменить простую сериализацию Java, и это работало почти из поля.
You need to force a clear:both
before the #main_content
div is closed. I would probably move the
into the
;#main_content
div and set the CSS to be:
.clear { clear: both; }
Update: This question still gets a fair amount of traffic, so I wanted to update the answer with a modern alternative using a new layout mode in CSS3 called Flexible boxes or Flexbox:
body { margin: 0; } .flex-container { display: flex; flex-direction: column; min-height: 100vh; } header { background-color: #3F51B5; color: #fff; } section.content { flex: 1; } footer { background-color: #FFC107; color: #333; }
Header
Content
Most modern browsers currently support Flexbox and viewport units, but if you have to maintain support for older browsers, make sure to check compatibility for the specific browser version.
Обычно я думаю, что это можно решить, заставив clear: both
rule on the last child-element of #items_list
.
Вы можете использовать:
#items_list:last-child {clear: both;}
Или, если вы используете динамический язык, добавить дополнительный класс к последнему элементу, сгенерированному в любом цикле, создает сам список, поэтому в вашем html вы получите что-то вроде:
<div id="list_item_20" class="last_list_item">
и css
.last_list_item {clear: both; }
добавить свойство float к #main_content
div - затем он будет расширен, чтобы содержать его плавающее содержимое
Следующее должно работать:
.main #main_content {
padding: 5px;
margin: 0px;
overflow: auto;
width: 100%; //for some explorer browsers to trigger hasLayout
}