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);
}
--
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [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.