如果我将bootstrap链接到我的模板,则表格页脚的宽度会缩小到最小尺寸(占用页面编号所需的空间,' Next'按钮和总行数) 。当我删除链接时,一切都还可以,但我需要为我的表单启动。 它看起来如何(添加链接到引导程序后的短页脚):
我的模板有代码:
base.html文件
/* Trim fat from windows*/
#define WIN32_LEAN_AND_MEAN
#pragma comment(linker, "/subsystem:windows")
/* Pre-processor directives*/
#include <windows.h>
#include "string.h"
/* Windows Procedure Event Handler*/
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
PAINTSTRUCT paintStruct;
/* Device Context*/
HDC hDC;
/* Text for display*/
char string [] = "hi im a form"; //this is whats i don't understand what //it is
/* Switch message, condition that is met will execute*/
switch(message)
{
/* Window is being created*/
case WM_CREATE:
return 0;
break;
/* Window is closing*/
case WM_CLOSE:
PostQuitMessage('0');
return 0;
break;
/* Window needs update*/
case WM_PAINT:
hDC = BeginPaint(hwnd,&paintStruct);
/* Set txt color to blue*/
SetTextColor(hDC, COLORREF(0xffff1a));
/* Display text in middle of window*/
TextOut(hDC,150,150,string,sizeof(string)-1); //and here why its //only able to declare it as "string" and not as a name
EndPaint(hwnd, &paintStruct);
return 0;
break;
default:
break;
}
return (DefWindowProc(hwnd,message,wParam,lParam));
}
object_list.html
{% load render_table from django_tables2 %}
{% load crispy_forms_tags %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<link rel="stylesheet" href="static/django_tables2/themes/paleblue/css/screen.css" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
<title></title>
</head>
<body>
{% block my_table %}{% endblock %}
</body>
</html
答案 0 :(得分:0)
似乎我需要的只是添加&#39; 宽度:100%; &#39;到&#39; table.paleblue + ul.pagination &#39;规则为 django_tables2 / themes / paleblue / css / screen.css 文件。
编辑过的css应该是这样的:
table.paleblue + ul.pagination {
background: white url(../img/pagination-bg.gif) left 180% repeat-x;
overflow: auto;
margin: 0;
padding: 10px;
border: 1px solid #DDD;
list-style: none;
width: 100%;
}