Microflow trigger in template grid: how to add css class?

1
I have a microflow trigger in a template grid, rendered as a link, and I want to assign a custom css class to it, because the link text must be a different colour than the other link buttons I use. In the CSS, I have already, previously included .mendix_Button_link, which affects all buttons. This class is automatically assigned to them. Now, when I add another class to the CSS, for example, .button_info, and then add this class to the microflow trigger in the modeler, it just simply ignores it. If I check it out using Firebug, it just doesn't even consider the class I just gave it. The <div> tag just includes the following classes: dijitInline mendix_Button mendix_Button_link templatesystemTemplateGrid_contentButton, but not the one I have specifically told it to use. What is causing my actions in the modeler to be overridden somewhere along the way? I would expect the class to be included in the tag, even if not 'listened to' ie. overridden by other CSS. Note: this is 2.5.2.1. EDIT: In response to the answers below: Thanks. I have noticed that if I add the class to the cell instead, it is included. However, it is not yet listened to. This is what is included with the cell class: .button_info { color: #0290BF !important; font-size: 11px; font-weight: bold; text-transform: uppercase; } Then under that, a div tag opens and the class .mendix_button_link is included automatically (as it should for all other buttons. I don't specify this in the modeler). This class is also defined in the same CSS file, so it is included here as: .mendix_Button_link { color: #FFF; font-weight: bold; text-transform: uppercase; font-size: 11px; } I am only trying to change the colour for now. The button still seems to listen to the button_link class though, and not to the class included on cell level, even though the color information there includes an !important; tag. If I disable the .mendix_Button_link color information in Firebug, the button starts listening to .button_info correctly, but I need to keep the Button_link tag for other buttons....
asked
2 answers
4

We generally put the class 'button_info' on the surrounding table cell rather than the link. That does work and has the advantage that you can write better selectors for Internet Explorer (which does not allow .mendix_Button_link.button_info but does allow .button_info .mendix_Button_link, You might need some extra '!importants' though)

Furthermore note that you should use 'button_info' (the HTML classname)as class rather than '.button_info' (the CSS classname)

answered
1

Michel is right. You really should add a class to the table cell of the microflow trigger. That way you could style the HTML tags of the microflow trigger. When you see your custom class name in firebug, you can try to change the color of the link realtime in Firebug. When you know which class selectors you have to use, add these in your theme.

answered