29
29
.. admonition:: Note
31
In the Django development version, all admin pages (except the dashboard) are fluid-width. All fixed-width classes have been removed.
31
All admin pages (except the dashboard) are fluid-width. All fixed-width
32
classes from previous Django versions have been removed.
33
34
The base template for each admin page has a block that defines the column
34
35
structure for the page. This sets a class on the page content area
35
(``div#content``) so everything on the page knows how wide it should be. There are three column types available.
36
(``div#content``) so everything on the page knows how wide it should be. There
37
are three column types available.
38
40
This is the default column setting for all pages. The "M" stands for "main".
47
49
Same as above, with the sidebar on the left. The source order of the columns
49
colM superwide (removed in Django development version)
50
This is for ridiculously wide pages. Doesn't really work very well for
51
anything but colM. With superwide, you've got 1000px to work with. Don't
53
flex (removed in Django development version)
54
This is for liquid-width pages, such as changelists. Currently only works
55
with single-column pages (does not combine with ``.colMS`` or ``.colSM``).
56
Form pages should never use ``.flex``.
58
For instance, you could stick this in a template to make a two-column page with the sidebar on the right::
52
For instance, you could stick this in a template to make a two-column page with
53
the sidebar on the right::
60
55
{% block coltype %}colMS{% endblock %}
66
**Removed in Django development version (see note above).**
68
There's a whole mess of classes in the stylesheet for custom pixel widths on
69
objects. They come in handy for tables and table cells, if you want to avoid
70
using the ``width`` attribute. Each class sets the width to the number of pixels
71
in the class, except ``.xfull`` which will always be the width of the column
72
it's in. (This helps with tables that you want to always fill the horizontal
73
width, without using ``width="100%"`` which makes IE 5's box model cry.)
75
**Note:** Within a ``.flex`` page, the ``.xfull`` class will ``usually`` set
76
to 100%, but there are exceptions and still some untested cases.
78
Available width classes::
80
.x50 .x75 .x100 .x150 .x200 .x250 .x300 .x400 .x500 .xfull
108
83
This is a custom class for blocks of inline help text explaining the
109
84
function of form elements. It makes text smaller and gray, and when applied
110
to ``p`` elements withing ``.form-row`` elements (see Form Styles below), it will
111
offset the text to align with the form field. Use this for help text,
112
instead of ``small quiet``. It works on other elements, but try to put the class
113
on a ``p`` whenever you can.
85
to ``p`` elements withing ``.form-row`` elements (see Form Styles below),
86
it will offset the text to align with the form field. Use this for help
87
text, instead of ``small quiet``. It works on other elements, but try to
88
put the class on a ``p`` whenever you can.
115
It aligns the text left. Only works on block elements containing inline elements.
90
It aligns the text left. Only works on block elements containing inline
117
93
Are you paying attention?
119
Keeps text and inline objects from wrapping. Comes in handy for table headers you want to stay
95
Keeps text and inline objects from wrapping. Comes in handy for table
96
headers you want to stay on one line.
173
149
appropriate formatting to the group of fields.
176
this will align the labels and inputs side by side on the same line.
152
This will align the labels and inputs side by side on the same line.
178
used in combination with ``.aligned`` to widen the space available for the labels.
154
Used in combination with ``.aligned`` to widen the space available for the