-5

Can someone please help with the above question, I want to display [current:user-picture] using token, which has a initial size of 100x100 and resize it to 20x20 with css. But its not working. I'D TRiED TO...
1. Change the image style to 20x20 but its thesame everywhere I use the token
2. «Span class='image-resize'»[current:user-picture]«/span».
help me out. If you can suggest another ways to resize the picture.

closed as off-topic by Letharion, Mołot, Free Radical, Bala, Patrick Kenny Oct 14 '14 at 5:36

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions on programming, PHP, SQL, etc. that do not relate directly to Drupal are off-topic here, but can be asked on Stack Overflow." – Letharion, Mołot, Free Radical, Bala, Patrick Kenny
If this question can be reworded to fit the rules in the help center, please edit the question.

  • A span is an inline element which does not have a height. Using a div instead should work as expected. Alternatively you can add 'display: block' or inline-block on the span. – Neograph734 Oct 9 '14 at 8:37
2

It is possible to resize an image using CSS but you'll need to make sure you're targeting the img element rather than the span. See this Codepen.

As an alternative you could try using ImageCache Token but there is presently only a dev release and may not be that stable:

Create a new image style, admin/config/media/image-styles/add, to resize the image and then install and enable ImageCache Token to provide you with a token for that image style.

Not the answer you're looking for? Browse other questions tagged or ask your own question.