We can do this: warn { background-color: yellow; color: black; padding: 5px; } .info { background-color: green; color: white; padding: 5px; } .error { background-color: red; color: white; padding: 5px; } .flash { margin: 0 auto; text-align: center; clear: both; border: 1px #000000; background-color: #FF5C1F; color: white; margin-top: 0.0em; margin-bottom: 1.0em; padding-top: 1.0em; padding-bottom: 1.0em; cursor: pointer; }
def index(): response.flash=DIV("Hello World",_class='info') return dict() But it looks ugly. Mind that it has to work decently even if one does def index(): response.flash="Hello World" return dict() Any advice? Massimo On 19 Apr, 12:00, Iceberg <iceb...@21cn.com> wrote: > Glad to have a happy ending of this story. :-) > > On Apr19, 11:25pm, mdipierro <mdipie...@cs.depaul.edu> wrote: > > > yes we can do that. I can include a warn, info and error in different > > colors. > > > Massimo > > > On Apr 19, 10:07 am, Yarko Tymciurak <yark...@gmail.com> wrote: > > > > this seems like a nice approach... one that separates concerns between > > > controller and view, and yet leaves things out of web2py, that is all to > > > the > > > application... > > > Does it make sense to support this kind of convention by having default > > > classes in CSS? > > > > On Sun, Apr 19, 2009 at 10:04 AM, mdipierro <mdipie...@cs.depaul.edu> > > > wrote: > > > > > BTW... one can also do > > > > response.flash=DIV("this is a message",_class="warn") > > > > and then declare a class "warn" in the CSS. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---