2010/5/13 Sergio Cambra .:: entreCables S.L. ::. <[email protected]>:
> On Jueves, 13 de Mayo de 2010 02:04:21 Iñaki Baz Castillo escribió:
>> Hi, how to use 'html_options' in action_link? I want to set a custom
>> icon for an action_link, is it documented how to do it with
>> 'html_options'?
>
> html_options only set html attributes for "A" element
>
> I would set it with CSS:
>
> /* Adding an icon */
> .active-scaffold .actions a.action_name {
> padding-left: 19px;
> background-position: 1px center;
> background-repeat: no-repeat;
> background-image: url(image);
> }
>
> /* Replacing text with icon with text-indent */
> .active-scaffold .actions a.action_name {
>  display: inline-block;
>  text-indent: -9999px;
>  width: 19px;
>  background-position: 1px 50%;
>  background-repeat: no-repeat;
>  background-image: url(image);
> }
> /* Replacing text with icon with padding-top and zero height */
> .active-scaffold .actions a.action_name {
>  display: inline-block;
>  padding-top: 20px; /* image height */
>  width: 20px; /* image width */
>  height: 0px;
>  overflow: hidden;
>  background-position: center;
>  background-repeat: no-repeat;
>  background-image: url(image);
> }


Great! I'll try them and comment the result.
Thanks.


-- 
Iñaki Baz Castillo
<[email protected]>

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en.

Reply via email to