Re: Best way to style every other item?

2010-07-07 Thread Sean
I would extend Grid or Vertical Panel and on add or insert, update the
CSS of the new element (Cell or VP Widget) to a questions-odd or
questions-even.

Removing would cause you to remove the widget, then update all the CSS
of the ones below the removed question.

On Jul 6, 5:07 pm, Brett Thomas brettptho...@gmail.com wrote:
 Hey, I want to create a panel with a list of questions, with every other
 question shaded to make it more visible. Advice on the best way to do this
 in GWT?

 One option is the CSS :nth-item tag, but looks like that has incomplete
 support. When Drupal populates a list, it automatically adds a -even or -odd
 class to items; that seems better. Another option is to add a class like
 this manually when you add an item to the list, but then removing an item
 becomes a pain. Maybe there is a better way to do this automatically that I
 am missing? Let me know...

 Thanks for the help,
 Brett

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



Best way to style every other item?

2010-07-06 Thread Brett Thomas
Hey, I want to create a panel with a list of questions, with every other
question shaded to make it more visible. Advice on the best way to do this
in GWT?

One option is the CSS :nth-item tag, but looks like that has incomplete
support. When Drupal populates a list, it automatically adds a -even or -odd
class to items; that seems better. Another option is to add a class like
this manually when you add an item to the list, but then removing an item
becomes a pain. Maybe there is a better way to do this automatically that I
am missing? Let me know...

Thanks for the help,
Brett

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