On Fri, Mar 5, 2010 at 1:07 PM, Julian Backes
<julianbac...@googlemail.com> wrote:
> Hi,
>
> I'm trying to get my first form in Lift running and I'm having the following
> problem:
>
> I use for example SHtml.text(..) to create a text input element.
> Unfortunately, this element has no specific class or id such that I can
> customize it using CSS or whatever.
>
> I know that I can add some parameters to SHtml.text(..) which are passed to
> the generated form element but this means that I have style information in
> my scala code. And this is, in my opinion, very ugly.

Not sure if you mean having the classname in scala code is ugly? If
not you can pass a class as attribute.....and style the class
externally

> Is there a better solution?
>
> I could imagine something like <e:myfield class="somecssclass"/>.

Yes, if in your snippet you use -%> instead of -> to bind, attributes
will be preserved.

Or you can use FuncAttrBindParam to bind calculated values for attributes.

/Jeppe

-- 
You received this message because you are subscribed to the Google Groups 
"Lift" group.
To post to this group, send email to lift...@googlegroups.com.
To unsubscribe from this group, send email to 
liftweb+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/liftweb?hl=en.

Reply via email to