On 10/24/07, John_Nowlan <[EMAIL PROTECTED]> wrote:
> -  could you add a bit relating the html to the code here? Not being an
> expert, I'm curious to know if things such as 'class="even"' come from
> the ListForm class and/or whether this is fixed html output and/or
> expecting a related css. At the end of the tutorial you mention in the
> coming next: 'How to tweak the form's template to precisely control its
> layout.'  So maybe just say that here, i.e. add a paragraph above 'Using
> the form in your application' that says: The layout of the form can be
> customized. 'How to tweak..' will be the subject of a following
> tutorial.

That's an important point that those of us familiar with CSS
customizing can easily overlook.  Taking a *very* quick look at the
article, you might do something like this.  (This itself may look ugly
but it illustrates the point.)

==== main.css ====
/* Default settings for page */
body {
    color: black;
    background-color: white;
    font-family: sans-serif;
    font-size: 12px;
    }

/* All forms of class 'postform' should be indented and have a colored border */
form.postform {
    margin-left: 100px;
    border-style: solid;
    border-width: 2px;
    border-color: #C5E3BF;   /* mint ice cream */
    }

/* Every other row should have a light colored background */
/* This affects all <li class="even"> elements, whether in a
'postform' or not. */
li.even {
    background-color: #F0F8FF;   /* Alice blue */
    }

/* All labels inside a 'postform' should be big and bold. */
form.postform label {
    font-size: 18px;
    font-weight: bold;
    }

/* I don't see offhand where error messges go in this form, but this is
    sorta what FormEncode would use.  This style affects any tag with
    class="error".  Typically it would be a <span>, <div>, or <td>.  */
.error {
    color: red;
    font-weight: bold;
    font-style: italic;
    }
====

The CSS reference I use is:  http://www.richinstyle.com/guides/css2.html

The CSS Zen Garden will blow you away how much you can change a page
with styles:   http://www.csszengarden.com/
Click on any of the design titles in the right column.

Alberto, can we get a short stylesheet example in the tutorial?

-- 
Mike Orr <[EMAIL PROTECTED]>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to