I've written an extension with which any of the Contao core fields for class or ID can be changed into a selectbox. You can find it here: http://contao.org/extension-list/view/css_select.html
The advantage is that you can now give your customer who edits his/her website the ability to assign classnames or ids to any element by using a selectbox. Typically there are a limited amount of css classes that are used in CSS or JS, so making a fixed list would suit most cases. Leaving the field as a text type forces you to either not use the field for the customer or supply a list with case sensitive words that they can use.
[attachment=0:2jpbccv2]picture.jpg[/attachment:2jpbccv2]
This extension replaces content_cssid_select that only did this for content elements.
TODO:
- ga.n suggested to add a checkbox to CSS styles so they get auto added to "the" list. Have to figure out how this works out now I have many lists with this new extension[/*:m:2jpbccv2]
Bookmarks