|
/*
* Django admin 的筛选侧栏默认是绝对定位(position: absolute; right: 0),
* 结果表格靠右侧 260px 留白让位。一旦留白失效或筛选面板过长,就会盖住列表。
* 这里把侧栏改回文档流内的浮动,二者各占各的空间。
*/
#changelist-filter {
position: static;
float: right;
width: 240px;
margin: 0 0 0 16px;
clear: none;
}
.change-list .filtered .results,
.change-list .filtered .paginator,
.change-list .filtered #toolbar,
.change-list .filtered div.actions {
margin-right: 260px;
}
/* 窄屏:侧栏落到列表下方,不再挤压表格 */
@media (max-width: 1200px) {
#changelist-filter {
float: none;
width: auto;
margin: 16px 0 0 0;
border-left: 0;
border-top: 1px solid #eee;
}
.change-list .filtered .results,
.change-list .filtered .paginator,
.change-list .filtered #toolbar,
.change-list .filtered div.actions {
margin-right: 0;
}
}
|