Fixed formatting in admin css docs

git-svn-id: http://code.djangoproject.com/svn/django/trunk@121 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Wilson Miner 2005-07-16 22:19:10 +00:00
parent 60bdadb9a3
commit b9ec05d4c0
1 changed files with 15 additions and 13 deletions

View File

@ -15,7 +15,7 @@ Modules
=======
The ``.module`` class is a basic building block for grouping content in the
admin. It's generally applied to ``div``s or ``fieldset``s. It wraps the content
admin. It's generally applied to a ``div`` or a ``fieldset``. It wraps the content
group in a box and applies certain styles to the elements within. An ``h2``
within a ``div.module`` will align to the top of the ``div`` as a header for the
whole group.
@ -68,7 +68,7 @@ in the class, except ``.xfull`` which will always be the width of the column
it's in. (This helps with tables that you want to always fill the horizontal
width, without using ``width="100%"`` which makes IE 5's box model cry.)
``'Note:``' Within a ``.flex`` page, the ``.xfull`` class will ``usually`` set
**Note:** Within a ``.flex`` page, the ``.xfull`` class will ``usually`` set
to 100%, but there are exceptions and still some untested cases.
Available width classes::
@ -103,16 +103,16 @@ There are also a few styles for styling text.
.help
This is a custom class for blocks of inline help text explaining the
function of form elements. It makes text smaller and gray, and when applied
to ``p``s withing ``.form-row`` elements (see Form Styles below), it will
to ``p`` elements withing ``.form-row`` elements (see Form Styles below), it will
offset the text to align with the form field. Use this for help text,
instead of ``small quiet``. It works on ``span``s, but try to put the class
on the ``p`` whenever you can.
instead of ``small quiet``. It works on other elements, but try to put the class
on a ``p`` whenever you can.
.align-left
It aligns the text left. Only works on block elements, I think.
It aligns the text left. Only works on block elements containing inline elements.
.align-right
Are you paying attention?
.nowrap
Keeps text from wrapping. Comes in handy for table headers you want to stay
Keeps text and inline objects from wrapping. Comes in handy for table headers you want to stay
on one line.
Floats and Clears
@ -137,7 +137,9 @@ additional class on the ``a`` for that tool. These are ``.addlink`` and
Example from a changelist page::
<ul class="object-tools"><li><a href="/stories/add/" class="addlink">Add story</a></li></ul>
<ul class="object-tools">
<li><a href="/stories/add/" class="addlink">Add story</a></li>
</ul>
and from a form page::
@ -152,10 +154,10 @@ Form Styles
Fieldsets
---------
Admin forms are broken up into groups by ``fieldset``s. Each form fieldset
should have a class ``.module``. Each fieldset should have a header ``h2``
within the fieldset at the top (except the first group in the form, and in some
cases where the group of fields doesn't have a logical label).
Admin forms are broken up into groups by ``fieldset`` elements. Each form fieldset
should have a class ``.module``. Each fieldset should have a header ``h2`` within the
fieldset at the top (except the first group in the form, and in some cases where the
group of fields doesn't have a logical label).
Each fieldset can also take extra classes in addition to ``.module`` to apply
appropriate formatting to the group of fields.
@ -177,5 +179,5 @@ Labels
Each form ``label`` and field should be enclosed in a header ``h4``. Any
explanation or help text should follow this ``h4`` in a ``p`` with class
``.help``. Form ``label``s should always precede the field, except in the case
``.help``. Form labels should always precede the field, except in the case
of checkboxes and radio buttons, where the ``input`` should come first.